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.
ADAdministrator Syncfusion Team March 21, 2007 05:52 PM UTC
Hi,
You can handle the MouseDown event of the grid and call the PointToRowCol method to detect the RowIndex and ColIndex of the cell in a Grid. Here is a code snipet
void gridDataBoundGrid1_MouseDown(object sender, MouseEventArgs e) { int row, col; GridDataBoundGrid grid = sender as GridDataBoundGrid; if (grid.PointToRowCol(new Point(e.X,e.Y), out row, out col)) { if (grid.Model[row,col].CellType == "ColumnHeaderCell") { MessageBox.Show(string.Format( "Column Header Index is {0}", col)); } } }
Best regards, Haneef
RDRohit DesaiSeptember 15, 2021 12:58 PM UTC
You have sample for this issue
i want to change color for selected column
is it possible
ARArulpriya Ramalingam Syncfusion Team September 16, 2021 12:12 PM UTC
Hi Rohit,
Thank you for your interest in Syncfusion products.
Yes, the BackColor for selected column can be updated using the CellClick event. Please make use of the below code example.