When the grid contains a large number of columns such that there is horizontal scrolling, and there are no records present, the scrolling does not scroll all the way to the right of the header.
ASPX
C#
When you first load the page, you cannot scroll all the way to the right to see the end of column 18. On my resolution I get to the middle of Col16.
Note that as soon as you resize a column the header is resized so that the scrolling works perfectly.
I also tried a couple of different skins but the all show the same behaviour.
Is there a size not being set properly on the initial load?
Thanks,
Stephen
ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head runat="server"> |
<title>Untitled Page</title> |
</head> |
<body> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server" /> |
<div> |
<telerik:RadGrid runat="server" ID="grid" > |
<MasterTableView AutoGenerateColumns="false" > |
<Columns> |
<telerik:GridBoundColumn DataField="col1" HeaderText="Col1" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col2" HeaderText="Col2" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col1" HeaderText="Col3" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col2" HeaderText="Col4" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col1" HeaderText="Col5" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col2" HeaderText="Col6" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col1" HeaderText="Col7" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col2" HeaderText="Col8" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col1" HeaderText="Col9" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col2" HeaderText="Col10" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col1" HeaderText="Col11" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col2" HeaderText="Col12" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col1" HeaderText="Col13" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col2" HeaderText="Col14" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col1" HeaderText="Col15" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col2" HeaderText="Col16" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col1" HeaderText="Col17" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="col2" HeaderText="Col18" HeaderStyle-Width="100px"></telerik:GridBoundColumn> |
</Columns> |
</MasterTableView> |
<ClientSettings> |
<Resizing AllowColumnResize="true" /> |
<Scrolling AllowScroll="true" UseStaticHeaders="true" /> |
</ClientSettings> |
</telerik:RadGrid> |
</div> |
</form> |
</body> |
</html> |
C#
using System; |
using System.Data; |
using System.Configuration; |
using System.Web; |
using System.Web.Security; |
using System.Web.UI; |
using System.Web.UI.WebControls; |
using System.Web.UI.WebControls.WebParts; |
using System.Web.UI.HtmlControls; |
using System.Net; |
using System.Collections.Generic; |
using Telerik.Web.UI; |
public partial class _Default : System.Web.UI.Page |
{ |
protected override void OnLoad(EventArgs e) |
{ |
base.OnLoad(e); |
BindData(); |
} |
private void BindData() |
{ |
DataTable table = new DataTable(); |
table.Columns.Add("col1"); |
table.Columns.Add("col2"); |
grid.DataSource = table; |
grid.DataBind(); |
} |
} |
When you first load the page, you cannot scroll all the way to the right to see the end of column 18. On my resolution I get to the middle of Col16.
Note that as soon as you resize a column the header is resized so that the scrolling works perfectly.
I also tried a couple of different skins but the all show the same behaviour.
Is there a size not being set properly on the initial load?
Thanks,
Stephen