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
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.
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.
Please login first to submit.