Disabling the Radgrid Paging and Sorting client side

6 posts, 0 answers
  1. Mandy
    Mandy avatar
    33 posts
    Member since:
    Mar 2010

    Posted 12 Oct 2010 Link to this post

    hello Admin,

    Thanks for your earlier support that helps in good time , i am stuck in a problem where i need to disable the paging and sorting client side ,right now i am doing paging and sorting client side and also binding the grid client side,Please help me with solution ASAP,

    Thanks,
  2. Tsvetina
    Admin
    Tsvetina avatar
    1873 posts

    Posted 15 Oct 2010 Link to this post

    Hi Mandeep,

    This functionality is not provided by RadGrid out-of-the-box but there are many ways to prevent these actions on the client - hide the controls performing them, handling the OnCommand event fired by them and canceling the default action, etc. The certain implementation to pick would depend on your own requirements. In what scenario do you need to disable these features?

    Regards,
    Tsvetina
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mandy
    Mandy avatar
    33 posts
    Member since:
    Mar 2010

    Posted 19 Oct 2010 Link to this post

    Thanks for the reply,
    in my scenario i have 100's of record in grid and i need paging and sorting client side and that works fine for me ,,but i am using the Radtree to filter one record so that when i click on one item on radTree it will only display me one record with all other details related to that particular record,
    and it also works fine but when i go for some testing stuff and click on the sorting the column it display me all the record of grid and the state is lost so at that ime when i have only one record in grid after click on RadTree i need to disable the sorting client side,
    i am successfully hide the paging stuff but still looking for the sorting issue,

    Please help me with this asap,

    Thanks
  5. Tsvetina
    Admin
    Tsvetina avatar
    1873 posts

    Posted 22 Oct 2010 Link to this post

    Hello Mandeep,

    If you mean that RadGrid is filtered and should not be sorted when you have a node of the TreeView expanded, what you can do is set a flag which by default is true indicating if the grid can be sorted and making it false in the OnNodeExpanded client-side event of the RadTreeView. Then you can wire the OnCommand event of RadGrid and if the commandName is Sort and the flag's value is false, cancel the event:

    var canSort=true;
      
    function onNodeExpanded(sender, args){
      canSort=false;
    }
      
    function onCommand(sender, args){
      if(args.get_commandName()=="Sort" && !canSort){
          args.set_cancel(true);
      }
    }

    You only need to decide in what case the canSort flag should be set back to true again and then implement this using the relevant client-side event of RadTreeView.

    All the best,
    Tsvetina
    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
  6. arrianesamante89
    arrianesamante89 avatar
    1 posts
    Member since:
    Oct 2010

    Posted 26 Oct 2010 Link to this post

    thanks for having this information, pretty much informative!
  7. Vijay kumar
    Vijay kumar avatar
    3 posts
    Member since:
    Aug 2012

    Posted 31 Aug 2012 Link to this post

    Hi Mandeep Singh  ,

    can u paste the code client side  for  sorting and paging to radgrid. please i searched so many sites but i didnt get the code any where..please help me...it would be great... thanks in advance

    or send the code to my email id vijay.nelakurthi@gmail.com,
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017