Explain the use of the ColumnDescriptor.AllowDropDownCell = false in a GridGroupingControl?
In a GridGroupingControl, to hide the dropdown buttons in the cell which are the auto generated dropdowns that show up as part of the filter bar cells or columns that are part of the foreign-key relations, it is advantageous to set the ColumnDescriptor.AllowDropDownCell property to false. This is because, if we set the AllowDropDownCell property to false, it will prevent the listbox part of the cells from being initialized when clicked inside the cell. It will be just a normal TextBoxCell and the base grouping engine will do the mapping from id to display column.
C#
// setting the AllowDropDownCell property.
this.gridGroupingControl1.TableDescriptor.Columns["State_Name"].AllowDropDownCell = false;
VB
' setting the AllowDropDownCell property.
Me.gridGroupingControl1.TableDescriptor.Columns("State_Name").AllowDropDownCell = False
But if we set the styles properties and leave the AllowDropDownCell property to true, then the cell type is still a listbox and the listbox will be initialised when clicked inside the cell eventhough it is not editable and no button is visible.The style properties are set by using the following code:
C#
style.ShowButtons=GridShowButtons.Hide;
style.ReadOnly=true;
VB
style.ShowButtons=GridShowButtons.Hide
style.ReadOnly=true
But even if it is set, the user can be still able to dropdown the cell with ALT + Down Arrow. To prevent this, you would also need to set the Clickable property to false.
C#
style.Clickable=false;
VB
style.Clickable=false
Sample:
http://websamples.syncfusion.com/samples/kb/grid.windows/GGCAllowDropDown/main.htm