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

Custom grid sort

1 Answer 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dave Hollen
Top achievements
Rank 1
Dave Hollen asked on 22 Sep 2010, 01:04 AM
Hello,

I am attempting to write code to sort the grid using an IEnumerable object as the data source.

Basically, I just get the column that the user is sorting by and perform an ORDER BY on my IEnumerable object and then rebind it to the grid.

The issue I am running into is that when I do it this way, the arrows in the column header that denote the sort direction (ascending, descending) do not appear.

Is there a way in which I can manually get the arrows to appear?

Thanks,
Dave

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 25 Sep 2010, 08:28 AM
Hi Dave,

I suggest that you bind the grid through its NeedDataSource event and assign to its DataSource the "raw" data. Then allow the grid to perform the sorting through its built-in mechanisms.
Otherwise, let us know why you what to return the data sorted yourself?

Regards,
Iana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Dave Hollen
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or