Radgrid Pagesize Dropdownlist problem

6 posts, 0 answers
  1. Rahul
    Rahul avatar
    142 posts
    Member since:
    May 2009

    Posted 23 Sep 2009 Link to this post

    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
  2. Mr. Plinko
    Mr. Plinko avatar
    56 posts
    Member since:
    Jul 2009

    Posted 23 Sep 2009 Link to this post

    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> 

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ramakrishna Gopishetty
    Ramakrishna Gopishetty avatar
    6 posts
    Member since:
    Feb 2009

    Posted 22 Mar 2010 Link to this post

    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?
  5. Fabio
    Fabio avatar
    4 posts
    Member since:
    May 2009

    Posted 15 Dec 2010 Link to this post

    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.

  6. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 20 Dec 2010 Link to this post

    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.
  7. Randall
    Randall avatar
    54 posts
    Member since:
    Jun 2008

    Posted 16 Mar 2011 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017