The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I'd like to mark or highlight colums that are groupable (AllowGroupByColumn = true). I thought about a foreach loop to process all the colum headers like: foreach() {if (AllowGroupByColumn == true) HeaderText = "MyText" =+ " *"; }
HAhaneefm Syncfusion Team June 5, 2007 09:21 PM UTC
Hi Christoph,
You can handle the QueryCellStyleInfo event to detect whether the grid can be grouped by this column when the user drags the column over GroupDropArea and set the style property of the column. Below is a code snippet
I'm calling this in the init part of the form (once).
this.ggcPurchaseList.QueryCellStyleInfo += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventHandler(CustomizedGridGrouping_FormatColumHeader);
The result is, that I don't get a single * after each ColumnHeader name but instead the application is producing constantly * like and when I debugg I can see that the function from above is working like it would be in an endless loop.
Any idea how to run this code only once?
HAhaneefm Syncfusion Team June 6, 2007 07:06 PM UTC
Hi Christoph,
You can prevent the repeated occurrence of '*' using the string.IndexOf method in QueryCellStyleInfo event. Below is a code snippet
Thank you for your great support. Just in case anyone needs it:
Problem: Mark all groupable (=AllowGroupByColumn) columns with a special character (in my case it is a *) automatically so that a user knows which column header he is able to drag to the GroupDropArea.
This function is called in the init part of the form like that: this.myGridGroupControl.QueryCellStyleInfo += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventHandler(FormatColumHeader);