Please see the attached picture. I have a Grid with multi column headers. How do I access header cells where red arrows and green arrow are pointing at respectively?
Accessing header cells is happening in RadGrid1_OnPreRender().
BTW, how to visually indicate filtering for grid with multi column header ? I tried this code in: https://docs.telerik.com/devtools/aspnet-ajax/knowledge-base/grid-visually-indicate-filtered-columns-in-excel-like-filtering
It works fine with common grid, but for grid with multi colum headers, it has bugs and cannot show properly.
Thank you!
Try this
protected void RadGrid1_OnPreRender(object sender, EventArgs e) { if (RadGrid1.MasterTableView.HasMultiHeaders) { foreach (GridColumnGroup group in RadGrid1.MasterTableView.ColumnGroups) { foreach (GridHeaderItem headerItem in group.HeaderCells) { // Access the header cell and perform any required operations. string headerText = headerItem.Text; // ... } } } }You may need to handle the filtering logic and UI customization manually.