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

RadGrid PagerStyle-Mode="NextPrevNumericAndAdvanced" Does not Work

3 Answers 200 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Awad
Top achievements
Rank 1
Awad asked on 02 Mar 2015, 02:38 PM
Hi All,
I'm using radgrid, but when using PagerStyle-Mode="NextPrevNumericAndAdvanced" it does not work,Here is the code :
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="AdvancedRadGridResults">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="AdvancedRadGridResults" />
                    <telerik:AjaxUpdatedControl ControlID="iframeBarcode"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
 <telerikHelper:AdvancedRadGrid ID="AdvancedRadGridResults" runat="server" SkinID="AdvancedRadGridArDefault" CellSpacing="0" GridLines="None" AutoGenerateColumns="False" ShowGroupPanel="True"
                    OnNeedDataSource="AdvancedRadGridResults_NeedDataSource" OnItemCommand="AdvancedRadGridResults_ItemCommand" OnInsertCommand="AdvancedRadGridResults_InsertCommand"
                    OnItemDataBound="AdvancedRadGridResults_ItemDataBound" OnUpdateCommand="AdvancedRadGridResults_UpdateCommand" OnDeleteCommand="AdvancedRadGridResults_DeleteCommand"
                    OnItemCreated="AdvancedRadGridResults_ItemCreated"  >

                    <ClientSettings>
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="400px" />
                    </ClientSettings>

                    <MasterTableView DataKeyNames="File_ID" AllowPaging="True" PagerStyle-AlwaysVisible="true"  PagerStyle-     Mode="NextPrevNumericAndAdvanced" >
                        
                        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

                        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>

                        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
     
                    </MasterTableView>
                </telerikHelper:AdvancedRadGrid>

            <iframe id="iframeBarcode" runat="server" src =""  style="display:none;"></iframe>
</asp:Content>
How to fix this problem,
Thanks .






3 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 05 Mar 2015, 02:01 PM
Hi Awad,

I have tested your RadGrid settings with dummy data and everything is working correctly on my end. Following is the example:
<telerik:RadAjaxManager ID="RadAjaxManagerProxy" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="AdvancedRadGridResults">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="AdvancedRadGridResults" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadGrid ID="AdvancedRadGridResults" runat="server" SkinID="AdvancedRadGridArDefault" CellSpacing="0" GridLines="None" AutoGenerateColumns="True" ShowGroupPanel="True"
    OnNeedDataSource="AdvancedRadGridResults_NeedDataSource">
    <ClientSettings>
        <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="400px" />
    </ClientSettings>
    <MasterTableView DataKeyNames="File_ID" AllowPaging="True" PagerStyle-AlwaysVisible="true" PagerStyle-Mode="NextPrevNumericAndAdvanced">
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
    </MasterTableView>
</telerik:RadGrid>

And the dummy data:
protected void AdvancedRadGridResults_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    DataTable table = new DataTable();
    table.Columns.Add("File_ID", typeof(int));
    table.Columns.Add("FileName", typeof(string));
    table.Columns.Add("BoolValue", typeof(Boolean));
    for (int i = 0; i < 50; i++)
    {
        table.Rows.Add(i, "FileName" + i, i % 2 == 0);
    }
 
    (sender as RadGrid).DataSource = table;
}

Since you are handling many server-side events of the RadGrid and you have enabled AJAX, can you please try to temporarily disable the AJAX and see if the same issue will be observed.

On a side note, please have in mind that we do not support custom inherited controls.

If you continue to face that problem, please open a regular support ticket with sample, runnable project attached, so we can test it locally.


Kind Regards,
Konstantin Dikov
Telerik
 

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.

 
0
Awad
Top achievements
Rank 1
answered on 09 Mar 2015, 09:29 AM
Hi Konstantin,
Thanks for your reply.
I'm using telerikHelper:AdvancedRadGrid ,from telerikHelper.dll,It does not work with me,but the  code u send working well!!.
I need to use the telerikHelper because its Arabic interface,and I need to use NextPrevNumericAndAdvanced pagerStyel-Mode also,
Is their any advice to solve this case,
Thanks again.
Awad Radwan
0
Awad
Top achievements
Rank 1
answered on 09 Mar 2015, 12:34 PM
Hi Konstantin,
Thanks for your reply.
Sorry about disturbing you,I've solved It.
The Issue was Theme ,go to App_theme folder and modify the default theme.
Thanks again.
Awad Radwan 
Tags
Grid
Asked by
Awad
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Awad
Top achievements
Rank 1
Share this question
or