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

Radgrid Pagesize Dropdownlist problem

5 Answers 363 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rahul
Top achievements
Rank 1
Rahul asked on 23 Sep 2009, 01:16 PM
Hello

I hv some problem when give the pagesize = 100 that time when i post back the  page the 100 zero is come on next line why this problem occure

<telerik:RadGrid ID="dgProposals" runat="server" GridLines="None" AutoGenerateColumns="False"
                                                                        Skin="Black" AllowMultiRowSelection="True" AllowPaging="True" PageSize="100  "
                                                                        AllowSorting="True" ShowStatusBar="true" Height="446px" Width="988px">

the drop down list is display page numbering like this
10
20
50
100

when select 100 ok
when i select 50 that time the dropdown list is diplay like this
10
20
50
10


the zero come next line

any property set the width of dropdownlist ?

urgent

5 Answers, 1 is accepted

Sort by
0
Mr. Plinko
Top achievements
Rank 1
answered on 23 Sep 2009, 02:02 PM
That is strange. When I try it in Firefox 3.5, the box remains a good width even on postback. What browser are you using?

Have you altered the RadComboBox skin CSS on your page anywhere?

You can make the dropdownlist into a textbox if you change the PagerStyle from NextPrevAndNumeric to NextPrevNumericAndAdvanced. This doesn't solve your problem directly, but it could work if you don't need a dropdown.
        <MasterTableView> 
            <PagerStyle Mode="NextPrevNumericAndAdvanced" /> 
        </MasterTableView> 

0
Ramakrishna Gopishetty
Top achievements
Rank 1
answered on 22 Mar 2010, 05:00 PM
I am having this same exact problem. Changing the PagerStyle mode isn't really an option for me. Did anyone ever find a proper solution to this?
0
Fabio
Top achievements
Rank 1
answered on 15 Dec 2010, 04:31 PM
I was looking for the same problem and I found this post unanswered.
Any update? I have a DDL with options:

4
10
20
50

And it opens like this:

4
1
0
2
0
5
0

This seems to happen on IE7, no skins applied.

<telerik:RadGrid ID="rgWorkExperience" Width="100%" ShowStatusBar="True" AllowSorting="True"
    PageSize="4" GridLines="None" AllowPaging="True" runat="server" AutoGenerateColumns="False"
    OnNeedDataSource="LoadGridWorkExperience" OnItemCommand="rgWorkExperience_ItemCommand" OnItemCreated="rgWorkExperience_ItemCreated"
    OnSelectedIndexChanged="rgWorkExperience_SelectedIndexChanged" OnDeleteCommand="rgWorkExperience_Delete">

I know that it seems to be browser-related (on my IE9 works fine) but unfortunately my client can't change his corporate browser.

Any workaround?

Thanks for your help,
Fabio.

0
Maria Ilieva
Telerik team
answered on 20 Dec 2010, 02:07 PM
Hi Fabio,

Could you please let me know which version of the controls you are using? We have faced similar problems in the past with some of our old versions however in the latest official release they are fixed. Please upgrade your application to the latest Q3 2010 release and let me know if the problem still persists.


Best wishes,
Maria Ilieva
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Randall
Top achievements
Rank 2
answered on 16 Mar 2011, 03:35 PM
Hello,

I had a similar problem with the width of the PageSize Dropdown list when I added 100, 200, "All" to the Dropdown.  My solution was to hook the RadGrid_ItemCreated event and configure the GridPagerItem as follows.  In my case, I set the Dropdown with to 50px.

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridPagerItem)
    {
        // ---------------------------------------------------------
        // This is how to add items to the RadGrid Pager ComboBox
        // and to adjust the width of the RadGrid Pager dropdown.
        // ---------------------------------------------------------
        GridPagerItem oGridPagerItem = (GridPagerItem)e.Item;
        RadComboBox oRadComboBox = (RadComboBox)oGridPagerItem.FindControl("PageSizeComboBox");
        oRadComboBox.Width = Unit.Pixel(50);
  
        RadComboBoxItem oItem = new RadComboBoxItem("100", "100");
        oItem.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID);
        oRadComboBox.Items.Add(oItem);
  
        oItem = new RadComboBoxItem("200", "200");
        oItem.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID);
        oRadComboBox.Items.Add(oItem);
  
        oItem = new RadComboBoxItem("All", oGridPagerItem.Paging.DataSourceCount.ToString());
        oItem.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID);
        oRadComboBox.Items.Add(oItem);
    }
}

I hope this helps you with your issue.

Thanks,
Randall Price
Virginia Tech
Tags
Grid
Asked by
Rahul
Top achievements
Rank 1
Answers by
Mr. Plinko
Top achievements
Rank 1
Ramakrishna Gopishetty
Top achievements
Rank 1
Fabio
Top achievements
Rank 1
Maria Ilieva
Telerik team
Randall
Top achievements
Rank 2
Share this question
or