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 Haneef ... How can i change the back color of any particular cell in Data Bound Grid ... I have tried using the following code but it's not working.
gridDataBound1[1,1].BackColor = Color.Red; or gridDataBound1.Model[1,1].BackColor = Color.Red;
ADAdministrator Syncfusion Team December 26, 2006 12:46 PM UTC
Hi Ubaid,
By default, DataBoundGrid doesn't store any style info properties. You can not set any cell or row specific properties for the DataBoundGrid other than the CellValue. You need to handle the PrepareViewStyleInfo (or Model.QueryCellInfo) Event to do this. Through this event you can set the style properties for the grid.
To set the BackColor for a cell, you check for the e.RowIndex/e.ColIndex, if that points to the row you desired, set the e.Style.BackColor for it.
See the KnowledgeBase Articles for more info. QueryCellInfo event : http://www.syncfusion.com/Support/article.aspx?id=10351 PrepareViewStyleInfo event :http://www.syncfusion.com/Support/article.aspx?id=560