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

[Solved] Radgrid Allowpaging client side

1 Answer 323 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gerry Polami
Top achievements
Rank 1
Gerry Polami asked on 26 Nov 2009, 07:05 AM
Hello,
How do i change the grid's Allowpaging property in client side (Javascrip) ?
Thanks
Gerry

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 Nov 2009, 10:13 AM
Hello Gerry,

I believe it's not directly possible to enable/disable the Paging functionality of the grid on the client side. But I implemented the following code to achieve a similar scenario, when setting AllowPaging is set to True declaratively:
aspx:
 <asp:Button ID="Button1" runat="server" OnClientClick="return changeAllowPaging();" Text="Allow Paging" /> 
             
 <telerik:RadGrid ID="RadGrid1" AllowPaging="true" DataSourceID="SqlDataSource1" runat="server"
     <MasterTableView DataSourceID="SqlDataSource1"
        ....       
                  

js:
function changeAllowPaging() 
   { 
          var grid = $find("<%= RadGrid1.ClientID %>");         
          var pagerRow = grid.get_masterTableView().get_element().tFoot;  
          pagerRow.style.display = "none";          
          grid.MasterTableView.set_pageSize(grid.MasterTableView.PageSize * grid.MasterTableView.PageCount) 
          return false
 
   } 

Thanks
Shinu.
Tags
Grid
Asked by
Gerry Polami
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or