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

Retrieve A Programmatically Assigned Datascource From A Grid

1 Answer 15 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kareem
Top achievements
Rank 1
Kareem asked on 20 Sep 2015, 07:59 AM

Hello,
I'm trying to apply a custom sorting on a grid datascource in the onsortcommand event
my datascource is Programmatically set and apparently whenever I try to retrieve it in the event I find the object is assigned to null

I'm using custom paging on my grid so there's no way to sort the records using the sorting expression without disabling virtual paging first

can you be guys of any help please??

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 23 Sep 2015, 08:50 AM
Hi Kareem,

In order to implement custom sorting for RadGrid you need to follow an approach similar to the one illustrated in the following online example.


You can retrieve the sort expression in the NeedDataSource event and build the appropriate query in order to retrieve the data from the data source.


Regards,
Viktor Tachev
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Kareem
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or