RadGrid Problem in Excel/PDF and Paging

4 posts, 0 answers
  1. Farshad
    Farshad avatar
    6 posts
    Member since:
    Feb 2012

    Posted 13 Jun 2012 Link to this post

    Hi everyone,
    Please response to Kassaiefarshad@yahoo.com

    I have used RadGrid in a Webpart in Sharepoint 2010. I am not using Ajax.

    I have got two problem as follow:
    Problem 1:

    When I enable Paging in RadGrid it doesn't work.It mean that when I click on page "2" to go to page two, it returns empty page.

    My webpart's code is as follow:
            <telerik:RadGrid ID="RadGridArzyabiDavari" runat="server" AllowPaging="True"
                AllowSorting="True" AutoGenerateColumns="False" CellSpacing="0"
    <Selecting CellSelectionMode="None"></Selecting>
    <MasterTableView AllowSorting="False" NoMasterRecordsText="موردی برای نمایش یافت نشد"
                    CommandItemDisplay="Bottom" PageSize="5">
    <CommandItemSettings ExportToPdfText="PDF خروجی" ExportToExcelText="Excel خروجی" ShowAddNewRecordButton="false"
      ShowExportToExcelButton="true" ShowExportToPdfButton="true"></CommandItemSettings>
    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
    <HeaderStyle Width="20px"></HeaderStyle>
    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
    <HeaderStyle Width="20px"></HeaderStyle>
            <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column"
                    <img height="100px"
        src='http://kms/MembersPictures/<;%#Eval("Expert")%>.jpg' style="border: 0px;"
        width="75px" />
            <telerik:GridBoundColumn DataField="ExpertDisplayName "
                FilterControlAltText="Filter ExpertDisplayName column" HeaderText="نام کاربری"
                SortExpression="ExpertDisplayName " UniqueName="ExpertDisplayName">
            <telerik:GridBoundColumn DataField="TedadDavari "
                FilterControlAltText="Filter TedadDavari column" HeaderText="تعداد داوری ها"
                SortExpression="TedadDavari " UniqueName="TedadDavari">
    <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
        <PagerStyle AlwaysVisible="True" />
    <ExportSettings FileName="KMSFile" IgnorePaging="true" OpenInNewWindow="true">
                    <Pdf Author="سیستم مدیریت دانش" Creator="گروه مشاورین هوژان"
                        PageHeight="297mm" PageWidth="210mm" PaperSize="A4" />
    <FilterMenu EnableImageSprites="False"></FilterMenu>
    Code Behind is as follow:
            protected void Page_Load(object sender, EventArgs e)
                     List<ReportsDataSources.ArzyabiDavari> arzyabidavari = new List<ReportsDataSources.ArzyabiDavari>();
                if (!Page.IsPostBack)
                    RadGridArzyabiDavari.DataSource = arzyabidavari;
    Problem 2:

    when I enable Paging in RadGrid ,then click on Export to Pdf/Excel button it returns an Error as follow:

    Script control 'PageSizeComboBox' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
    Parameter name: scriptControl
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 Jun 2012 Link to this post

    Hello Farshad,

    I cannot reproduce the error at my end. Please elaborate a bit more on this.
    The grid returns an empty page because you are using simple data binding. In order to use advanced features in grid, make sure that you are using advanced data binding using its NeedDataSource event. Check the following help documentation which explains the same.
    Advanced Data-binding (using NeedDataSource event)

  3. Velu
    Velu avatar
    4 posts
    Member since:
    Jun 2013

    Posted 24 Nov 2014 in reply to Farshad Link to this post


    I have the same problem. Were you able to resolve this issue?
  4. Kostadin
    Kostadin avatar
    1733 posts

    Posted 27 Nov 2014 Link to this post

    Hi Velu,

    Could you please verify that you are using an advanced data biding? Note that using of this type of binding should fix the issue with the paging. Regards the issue with exporting the grid to PDF could you please elaborate a little bit more.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top