Product Bundles
DevCraft
All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
Web
Mobile
Document Management
Desktop
Reporting
Testing & Mocking
CMS
UI/UX Tools
Debugging
Free Tools
Support and Learning
Productivity and Design Tools
HI, I'm using rad grid with grouping, i've grouped two columns.
Now i want to give two different colors to those two grouped (App Type, Status) columns.
I need Black color font for Status and Blue color font for App Type.
How to achieve this, please help.
Thanks
Hi Chakradhar,
You can use the ItemDataBound event to get access to each GroupHeaderItem and set its ForeColor conditionally.
For instance:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) { var groupHeaderItem = e.Item as GridGroupHeaderItem; if (groupHeaderItem != null) { if (groupHeaderItem.DataCell.Text.StartsWith("App Type")) { groupHeaderItem.ForeColor = Color.Blue; } else if (groupHeaderItem.DataCell.Text.StartsWith("Status")) { groupHeaderItem.ForeColor = Color.Black; } } }
You may also find it useful to check out the Customizing GridGroupHeaderItem article.
I hope this will help you achieve the desired.
Please let me know if any further questions come up.
Kind regards, Doncho Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.