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.
Can I do conditional formatting for individual cells in a Syncfusion grid grouping control. I dont want to format the whole record, just the individual cell based on a certain condition.
LSLingaraj S Syncfusion Team May 23, 2009 06:27 AM UTC
Hi Abhinav,
Thank you for your interest in Syncfusion product.
In GridGroupingControl the cell formatting done through the GridTableCellStyleInfo. If you need to format the cell, then please try using GridTableCellStyleInfo or Style property in QueryCellStyleInfo event to achieve this behaviour.
Please refer the code below: // through GridStyleInfo GridTableCellStyleInfo style=this.grid.TableModel[1, 2]; style.BackColor=Color.Red; style.TextColor=Color.Yellow; // through WueryCellInfo this.gridControl1.QueryCellStyleInfo += new GridQueryCellInfoEventHandler(grid_QueryCellStyleInfo); void grid_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e) { if (e.TableCellIdentity.RowIndex == 2 && e.TableCellIdentity.ColIndex == 5) { e.Style.BackColor=Color.Red; e.Style.TextColor=Color.Yellow; } }