Property Grid

Answered
0
0

Is there a way to hide the row headers in the property grid?  I love the property grid and am using it as a way to handle input of parameters for a reporting module – but with the row headers showing – it looks a little heavy.

I don’t see any property like .ShowRowHeaders.

 

Thanks,

Matthew

Attachment
  • You must to post comments
Best Answer
0
0

The PropertyGrid is a container for SplitContainer with a DataGridView in Panel1. You can handle the inner DGV like this:

 

var grid = (DataGridView)propertyGrid.Controls[0].Controls[0].Controls[0];
grid.RowHeadersVisible = false;

 

I’d also set the PropertySort to Alphabetical to remove the categories.

You can also use a DataGridView instead of a PropertyGrid to edit different data types, it supports difference cells in the same column. For example, you can create a simple DataGridViewColumn and the assign the cells in the rows to CheckBoxCell, DateTimePickerCell, etc. All in the same column.

 

 

  • Luca
    • Luca
    • Nov 17, 2017 - 1:21 am
    It works well also with the Categories. Will add an enhancement to expose a property and to expand/collapse on double clicks, long taps and keyboard action.
  • Tim Romano
    Do you have an example showing how to assign custom editors to the PropertyGrid cell? If Wisej will allow use of the DevExpress editors, including their TreeView, as a cell-editor with the WiseJ PropertyGrid, we will probably be able to convert our legacy Winform apps to WiseJ.
  • Luca
    • Luca
    • Aug 20, 2020 - 5:56 pm
    The PropertyGrid in Wisej supports the full System.ComponentModel system, just like the PG in Winforms. You can use the UITypeEditor attribute to plugin your own editor. Just use IWisejEditorService instead of IWindowsFormsEditorService. Look up UITypeEditor in Microsoft ComponentModel docs. Wisej also supports additional simpler ways to use custom editors in the SelectedGridItemBeginEdit event. https://wisej.com/docs/2.1/html/T_Wisej_Web_SelectedGridItemBeginEditEventArgs.htm Look also at https://docs.microsoft.com/en-us/dotnet/api/system.drawing.design.uitypeeditor?view=netcore-3.1. Using DevExpress winforms control on the web is impossible. You can use DevExtreme javascript controls. See http://demo.wisej.com/devextreme Please contact us directly at info@wisej.com if you’d like more targeted help.
  • Luca
    • Luca
    • Aug 21, 2020 - 3:56 pm
    I created a new issue and added a simple sample showing 3 techniques: UITypeEditor, TypeConverter, and SelectedGridItemBeginEdit event. See https://wisej.com/support/question/propertygrid-custom-editor-sample.
  • You must to post comments
0
0

Thank you Luca.  That fix works perfectly, I appreciate the help.  See attached – it looks much better to me.

I’d suggest an enhancement to open up the .RowHeadersVisible property to be accessible directly in PropertyGrid itself.

But I’m very happy with your solution – it works great. See attached.

Attachment
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.