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

Page Size control of RadGrid not working

2 Answers 324 Views
Let's talk about telerik (the good and the bad)
This is a migrated thread and some comments may be shown as answers.
Mansi Deshpande
Top achievements
Rank 1
Mansi Deshpande asked on 26 May 2010, 06:39 AM

Issue with RADGrid control:

We are using an RAD Grid which populates data from a webservice. We have paging enabled on this grid and use the by default pager whichcomes with a “Page Size” drop down, giving us option to choose desired pagesize. To avoid page reload every time we click the page number to view the rowson other page, we use RAD AJAX Manager. This Grid has ”Export to PDF” and“Export to Excel “ Buttons also.

We finally deploy this page on a Share Point WebApplication. In SharePoint, once we click on any export button, all othercontrols are disabled which gets enabled only after refreshing the page.  We have found a solution for this as depictedhere:

http://andreasglaser.net/post/2009/08/04/SharePoint-2007-Ajax-and-onsubmit3dreturn-_spFormOnSubmitWrapper()3b.aspxand http://www.bewise.fr/article/PTC/57/WSS-V3-Use-ASP-NET-AJAX-Framework-with-WSS-30.aspx

This helped us to get rid of that issue.

Presently our RAD Grid is working fine, but we are  facing issues with “Page Size” controls.Which works only for the first time. After that it does not allow me to selectany value from “Page Size” combo box. It just gets disabled.

However everything works fine with asp.net standalone application but the issue is after deploying to sharepoint.

this is the code snippet i am refferingto:

<telerik:RadAjaxManagerID="RadAjaxManager1" runat="server">

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="RadGrid2">

                        <UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="RadGrid2" />

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

            </telerik:RadAjaxManager>

           

<telerik:RadGrid ID="RadGrid2"runat="server" AllowPaging="True"

AllowSorting="True" DataSourceID="ObjectDataSource1"GridLines="None"

onneeddatasource="RadGrid2_NeedDataSource"Visible="False"  >

<HeaderContextMenuEnableAutoScroll="True"></HeaderContextMenu>

<MasterTableViewAutoGenerateColumns="False" CellSpacing="-1"

DataSourceID="ObjectDataSource1">

<RowIndicatorColumn>

<HeaderStyleWidth="20px"></HeaderStyle>

</RowIndicatorColumn>

<ExpandCollapseColumn>

<HeaderStyleWidth="20px"></HeaderStyle>

</ExpandCollapseColumn>

<Columns>

<telerik:GridBoundColumn DataField="ID"HeaderText="ID"

SortExpression="ID" UniqueName="ID"DataType="System.Int32">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="ContactName"HeaderText="ContactName"

SortExpression="ContactName"UniqueName="ContactName">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Company" HeaderText="Company"

SortExpression="Company" UniqueName="Company"DataType="System.Int32">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Phone"HeaderText="Phone"

SortExpression="Phone" UniqueName="Phone">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Email"HeaderText="Email"

SortExpression="Email" UniqueName="Email">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Type" HeaderText="Type"

SortExpression="Type" UniqueName="Type">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Esc"HeaderText="Esc"

SortExpression="Esc" UniqueName="Esc">

</telerik:GridBoundColumn>

        <telerik:GridBoundColumnDataField="Zip" HeaderText="Zip"SortExpression="Zip"

UniqueName="Zip">

</telerik:GridBoundColumn>

</Columns>

  

</MasterTableView>

<ExportSettings>

<Pdf FontType="Subset"PaperSize="A4" />

</ExportSettings>

</telerik:RadGrid>

<asp:Button ID="Button1"runat="server" onclick="Button1_Click"

Text="Export To PDF" Height="32px"Width="141px"

style="margin-right: 0px" Visible="False" />

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:Button ID="Button2"runat="server" onclick="Button2_Click"

Text="Export To Excel" Height="32px"Width="141px" Visible="False"  />

2 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 31 May 2010, 03:39 PM
Hi Mansi,

Can you temporary disable ajax and see if the issue persists and if you have any server-side errors? Also try removing the NeedDataSource event handler ass it is odd when you are binding the grid using declarative datasource control. It also might be of help if you can send us the server-side code used.

Let me know how it goes.

Regards,
Iana
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.
0
Mansi Deshpande
Top achievements
Rank 1
answered on 02 Jun 2010, 07:11 AM
Hi Lana,

Thanks for your reply. Appreciated!!

As per your suggestion, if I disabled ajax, then all controls inside the grid were working fine but end up  with entire reload of page. Since our requirement was specific to grid and not the entire page reload I thought of another solution which is as follows.

I removed AJAXManager from my code and moved the RadGrid control inside the Ajax Update panel.Thereby i got the solution.

Anyways, thanks for all your efforts and the time considered for me.

regards,
Mansi





Tags
Let's talk about telerik (the good and the bad)
Asked by
Mansi Deshpande
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Mansi Deshpande
Top achievements
Rank 1
Share this question
or