BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e) { if (e.TableCellIdentity.GroupedColumn != null && e.TableCellIdentity.DisplayElement.ParentGroup != null && e.TableCellIdentity.DisplayElement.ParentGroup.Category is int ) { if (e.TableCellIdentity.DisplayElement is CaptionRow && e.TableCellIdentity.GroupedColumn.Name == "Col2") { int cat = (int) e.TableCellIdentity.DisplayElement.ParentGroup.Category; string ret = ""; switch (cat) { case 1: ret = " < 20"; break; case 2: ret = "20 - 35"; break; case 3: ret = "> 35"; break; } e.Style.CellValue = String.Format("{0}: {1} Items.", ret, e.TableCellIdentity.DisplayElement.ParentGroup.GetChildCount()); } } } public static int GetCategory(int i) { int ret = 0; if(i < 20) ret = 1; else if(i >= 20 && i < 35) ret = 2; else ret = 3; return ret; }
>private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e) >{ > if (e.TableCellIdentity.GroupedColumn != null && e.TableCellIdentity.DisplayElement.ParentGroup != null > && e.TableCellIdentity.DisplayElement.ParentGroup.Category is int > ) > { > if (e.TableCellIdentity.DisplayElement is CaptionRow > && e.TableCellIdentity.GroupedColumn.Name == "Col2") > { > int cat = (int) e.TableCellIdentity.DisplayElement.ParentGroup.Category; > string ret = ""; > switch (cat) > { > case 1: > ret = " < 20"; > break; > case 2: > ret = "20 - 35"; > break; > case 3: > ret = "> 35"; > break; > } > e.Style.CellValue = String.Format("{0}: {1} Items.", ret, e.TableCellIdentity.DisplayElement.ParentGroup.GetChildCount()); > } > } >} > > >public static int GetCategory(int i) >{ > int ret = 0; > if(i < 20) > ret = 1; > else if(i >= 20 && i < 35) > ret = 2; > else > ret = 3; > return ret; >} >