radgrid paging in javascript?

6 posts, 2 answers
  1. Bhuvan
    Bhuvan avatar
    50 posts
    Member since:
    Dec 2010

    Posted 11 Mar 2011 Link to this post

    Hi i am doing change of page size of radgrid  on click of radpane event PaneCollapsed , but its not changing ? how to do this?


       function PaneCollapsed(sender, eventArgs) {
           var grid = $find('<%= radgvInbox.ClientID%>');
           grid.MasterTableView.PageSize = 20;
           var masterTable = $find("<%= radgvInbox.ClientID %>").get_masterTableView();
           masterTable.PageSize = 20;                  
       }

    i tried the above two ways... how to do this?
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 14 Mar 2011 Link to this post

    Hello Bhuvan,

    You can use the GridTableView property set_pageSize(); sets the page size for the respective GridTableView object.

    JavaScript:
    function setPageSize()
     {
        var grid = $find('<%= grid.ClientID%>');
        grid.MasterTableView.set_pageSize(20);
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bhuvan
    Bhuvan avatar
    50 posts
    Member since:
    Dec 2010

    Posted 14 Mar 2011 Link to this post

    Hi shinu

    Thanks the above one is working ..Yeah i tried to set the page like this

      grid.get_element().style.height = 700;
    in the same panecollapsed event..but it is also not working..? how to do this? 
  5. Bhuvan
    Bhuvan avatar
    50 posts
    Member since:
    Dec 2010

    Posted 14 Mar 2011 Link to this post

    i tried the grid height 
      grid.get_element().style.height = 700;
    but its not working how to do this?
  6. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 15 Mar 2011 Link to this post

    Hello Bhuvan,

    You can try implementing the approach from the following CodeLibrary article. 
    How to set RadGrid height client-side with Javascript

    Thanks,
    Shinu.
  7. Bhuvan
    Bhuvan avatar
    50 posts
    Member since:
    Dec 2010

    Posted 15 Mar 2011 Link to this post

    This is good one and good example thanks shinu
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017