Retrieve A Programmatically Assigned Datascource From A Grid

2 posts, 0 answers
  1. Kareem
    Kareem avatar
    8 posts
    Member since:
    Sep 2015

    Posted 20 Sep 2015 Link to this post

    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??

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2312 posts

    Posted 23 Sep 2015 Link to this post

    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
Back to Top