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

Set page size greater than items count

3 Answers 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Evgenia Styaglick
Top achievements
Rank 1
Evgenia Styaglick asked on 06 May 2010, 04:34 PM

The problem is that we can’t set the Page Size greater than the Items Count.

We want to be able to set the page size 10 even if there is 4 items in the source list.

 

Steps to reproduce: bind to the grid the source with 4 items, try to enter 10 to the Page Size texbox, press Change button.

Actual result: the value of the textbox is turned back to previous value.

Expected result: the page size is changed to 10

 

The aspx code :

 

<telerik:RadGrid ID="dgdTransList" runat="server" AutoGenerateColumns="True"

    GridLines="None" EnableAJAX="true" PageSize="5" ShowFooter="true"

    AllowPaging="true" 

  

    <PagerStyle

        Visible="true"

        Mode="NextPrevNumericAndAdvanced"

        AlwaysVisible="true"

       

        />

       

</telerik:RadGrid>

 

The cs code :

 

        void dgdTransList_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)

        {

 

            ArrayList list = new ArrayList(new object[] { "one", "two", "three", "four" });

 

            dgdTransList.DataSource = list;

        }

 

Can you please tell us is there any workaround?

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 07 May 2010, 02:02 PM
Hi Evgenia,

The observed behavior is expected when you use NextPrevNumericAndAdvanced PagerStyle-Mode. In order to achieve the desired functionality, you could use NextPrevAndNumeric pager.

Greetings,
Pavlina
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
Evgenia Styaglick
Top achievements
Rank 1
answered on 12 May 2010, 12:45 PM
The problem is that we use the RadGrid.Net2.dll version 5.0.1.0 and the NextPrevAndNumeric mode does not give us the possibility to change the pages. And we can not change the version of the controls for now.
What can we do in this version to fix the problem?
0
Pavlina
Telerik team
answered on 14 May 2010, 01:47 PM
Hello Evgenia,

In order to achieve the desired functionality you could customize the default pager. Thus you can define completely new look and feel for your pager and still use the default paging functionality of Telerik RadGrid.

More information is available here:
Setting pager template
Programmatic pager customization

Greetings,
Pavlina
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.
Tags
Grid
Asked by
Evgenia Styaglick
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Evgenia Styaglick
Top achievements
Rank 1
Share this question
or