This is a migrated thread and some comments may be shown as answers.

Highlight sorted column

2 Answers 186 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 25 Jun 2012, 11:45 AM
Hi,

I'm trying to recreate the styling of the grid in CRM2011. I've got almost everything done. One thing I'm not able to do is to highlight the sorted column by changing its background colour. Is there a way to do this?

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 27 Jun 2012, 07:33 AM
Hello John,

You can use the Grid's dataBound event and check the sorted state in

arg.sender.dataSource.sort()

which will return an array of objects with a dir and field properties (arg is the event argument variable).

Using this information, you can apply custom styling to the cells that belong to the sorted columns. You may also want to make use of the arg.sender.columns array.

If you need further assistance with this, please open a new support ticket.

Greetings,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Richard
Top achievements
Rank 1
answered on 02 Jul 2012, 11:19 AM
Awesome, worked a treat, thanks!
Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Richard
Top achievements
Rank 1
Share this question
or