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.
Hi, We are using Syncfusion Essential Studio 4.4.0.55 (GridGroupingControl). I need to show the text in cell as red depending on the values in other cells of that row. I will get this values in QueryValue event only and formatting of cells can be done in QueryCellStyleInfo event. Could you please help me in setting the formatting on cells in QueryValue. Also i need to change the header text in ExtraSection(custom headers) in QueryValue.
ADAdministrator Syncfusion Team March 12, 2007 08:58 PM UTC
Hi Anand,
The QueryValue event is occured when the value for the unbound field descriptor or records are return. If you want to format the cell, you need to handle the QueryCellStyleInfo event of the grid and set the Style.Format to required format in a grid. Here is a code snippet
Also refer the TextFormat browser sample for more details. \Syncfusion\Essential Studio\4.4.0.49\windows\Grid.Windows\Samples\Appearance\TextFormat\cs
Best regards, Haneef
ADAdministrator Syncfusion Team March 20, 2007 07:42 AM UTC
Hi Haneef, How can I get the value of the cell which is getting painted and other cells as well for the same row in QueryCellStyleInfo so that I can decide what formatting has to be applied to the text of the painting cell. Please help. Many Thanks in advance.
ADAdministrator Syncfusion Team March 20, 2007 09:27 PM UTC
Hi Anand,
You can use the Record.GetValue method to get the value of the cells in a grid. Here is a code snippet
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) { Element el = e.TableCellIdentity.DisplayElement; if(el.Kind == DisplayElementKind.Record ) { GridRecordRow row = el as GridRecordRow ; if( row != null && row.ParentRecord != null) { object obj = row.ParentRecord.GetValue("Col3"); Console.WriteLine(obj); } } }