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

Overlapping Page Size Numbers in Drop Down Selection

1 Answer 35 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dennis
Top achievements
Rank 1
Dennis asked on 13 May 2009, 10:37 PM
Versions: IE 7.6001.18000; Controls: 2009.1 402

When I have a Grid that has multiple pages and set to show the Page Size selection, under IE 7, it puts scroll bars on the drop down causing the page numbers (i.e. 10, 20, 50) to wrap vertically on each other. This makes it look like the selections are 1, 2, 5, and 0 with scroll bars.

This does not occur with Chrome or Firefox. This did not occur in 311, but is new to the April version.



1 Answer, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 14 May 2009, 09:18 AM
Hello Dennis,

We are aware of this problem and will do our best to track it down and fix it for a future version of RadControls. In the meantime, here is how to apply a CSS style to the RadComboBox dropdown, which will prevent the scrollbars from appearing. Sorry about the inconvenience.


<%@ Page Language="C#" %> 
<%@ Import Namespace="System.Data" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<script runat="server"
 
    public string PageSizeComboBoxClientID; 
     
    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) 
    { 
        DataTable dt = new DataTable(); 
        DataRow dr; 
        int colsNum = 3
        int rowsNum = 100
        string colName = "Column"
 
        for (int j = 1; j <= colsNum; j++) 
        { 
            dt.Columns.Add(String.Format("{0}{1}", colName, j)); 
        } 
 
        for (int i = 1; i <= rowsNum; i++) 
        { 
            dr = dt.NewRow(); 
 
            for (int k = 1; k <= colsNum; k++) 
            { 
                dr[String.Format("{0}{1}", colName, k)] = String.Format("{0}{1} Row{2}", colName, k, i); 
            } 
            dt.Rows.Add(dr); 
        } 
 
        (sender as RadGrid).DataSource = dt
    } 
 
    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridPagerItem) 
        { 
            PageSizeComboBoxClientID = (e.Item as GridPagerItem).FindControl("PageSizeComboBox").ClientID; 
        } 
    } 
 
</script> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
<title>RadControls for ASP.NET AJAX</title> 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
<style type="text/css"
 
#<%= PageSizeComboBoxClientID %>_DropDown 
    overflow:hidden !important; 
 
</style> 
</telerik:RadCodeBlock> 
</head> 
<body> 
<form id="form1" runat="server"
<asp:ScriptManager ID="ScriptManager1" runat="server" /> 
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Vista" /> 
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" 
    DefaultLoadingPanelID="RadAjaxLoadingPanel1"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadGrid1"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> 
 
<telerik:RadGrid 
    ID="RadGrid1" 
    runat="server" 
    Width="800px" 
    Skin="Vista" 
    AllowPaging="true" 
    OnItemCreated="RadGrid1_ItemCreated" 
    OnNeedDataSource="RadGrid1_NeedDataSource"
     
</telerik:RadGrid> 
 
</form> 
</body> 
</html> 



All the best,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Dennis
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or