Client Side Sorting of RadGrid

7 posts, 0 answers
  1. Srinivas Dhulipala
    Srinivas Dhulipala avatar
    8 posts
    Member since:
    Jun 2009

    Posted 08 Mar 2012 Link to this post

    Hi,
    I have a RadGrid with around 15 columns and I show around 250 rows of data.
    I want the client side sorting functionality on this Grid.
    I tried many examples proposed in this thread, but couldn't achieve this functionality.
    I also tried ajaxifying the Grid. It did the Sort, but it's still a Semi-Server Sort.
    My Data Bind methods are on the Server Side. Can I achieve the Client Side Sorting so that this process becomes faster?
    I saw some examples using Webservice in this thread. But I am not using Web Service in my design.
    Please let me know how this can be accomplished?
    Thanks
    Srinivas
  2. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 13 Mar 2012 Link to this post

    Hi Srinivas,

    Thank you for contacting us.

    Unfortunately the RadGrid does not support the desired functionality. The sorting functionality is performed over the data source to which the RadGrid is bound. If you bound the RadGrid on the server a post back is needed in order to apply sorting expression and return sorted data. If you want to have client side sorting you need to bind the RadGrid on the client. Also if you do not need any web services you could bind the RadGrid to web methods which are placed into the code behind file of the page. On the following link you could find online example which demonstrates this:
    http://demos.telerik.com/aspnet-ajax/grid/examples/client/databinding/defaultcs.aspx

    Please give it try and let me know if it helps you. Looking forward for your reply.

    Regards,
    Radoslav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Srinivas Dhulipala
    Srinivas Dhulipala avatar
    8 posts
    Member since:
    Jun 2009

    Posted 13 Mar 2012 Link to this post

    Hi Radoslav,
    Thanks for replying.
    I tried the example in you reply.
    However the updateGrid method does not fire for me. I put the debugger in the Javascript method.
    The Debugger flows from pageLoad method in the Javascript to the Web Method (Not a Web Service, It's a Page Method with a Web Method Attribute), gets the data, forms a collection, returns it, but does not go to the Update Grid Method.
    What I am I Missing?
    I am coding in VS 2008 and my Telerik Dll's are of version: 
    a) Telerik.Web.UI  : 2011.3.1305.35
    b) Telerik.Web.Design  : 2011.3.1305.35 
    c) Telerik.Web.UI.Skins  : 2011.3.1305.35 .
    Please let me know...This is very Urgent...I need it really badly..
    Thanks once again for your help.
    Srinivas
  5. Srinivas Dhulipala
    Srinivas Dhulipala avatar
    8 posts
    Member since:
    Jun 2009

    Posted 14 Mar 2012 Link to this post

    Hi Radoslav,
    I found out the Issue. I had an Issue with JSON Serialiazation.
    I fixed that Issue.
    Thanks for your Help.
    Srinivas
  6. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 16 Mar 2012 Link to this post

    Hi Srinivas,

    I am glad that you resolved the described issue. In case you experience any further problems, do not hesitate to contact us again. I will be glad to assist you further.

    Kind regards,
    Radoslav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  7. Bob
    Bob avatar
    7 posts
    Member since:
    Jun 2012

    Posted 21 Jun in reply to Radoslav Link to this post

    Does RadGrid still not support Client-Side sorting without binding the data on the client side?
  8. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 24 Jun Link to this post

    Hello,

    The behavior described by Radoslav stands true. In order to use client-side operations for the grid you should bind it on the client. Check out the following resources that illustrate different approaches you can use to bind the RadGrid client-side.



    Regards,
    Viktor Tachev
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017