Category / Section
How to enable the Tri-State CheckBoxColumn in Winforms GridGroupingControl ?.
1 min read
In Winforms GridGroupingControl, we can enable the tri-state CheckBox by using the QueryCellStyle event. In this event, we can fetch the CheckBox column style and then set the “TriState” property to true.
Please Refer the code snippet :
public Form1()
{
InitializeComponent();
gridGroupingControl1.QueryCellStyleInfo += GridGroupingControl1_QueryCellStyleInfo;
}
private void GridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
GridStyleInfo style = this.gridGroupingControl1.TableDescriptor.Columns["CheckList"].Appearance.AnyRecordFieldCell;
style.TriState = true;
}
Image Reference
Take a moment to peruse the Appearance-and-Formatting to learn more about the appearance and formatting of GridGroupingControl at design time as well as at run time.