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

Some columns disappear when grid contains no data

3 Answers 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joshua Medor
Top achievements
Rank 1
Joshua Medor asked on 18 Aug 2010, 06:22 PM
For some reason, when my radgrid is displayed with no data in it, the right-most columns (the number of columns varies) disappear from view.  I have the ClientSettings scrolling properites set (allowscroll="true", UseStaticHeaders="true", ScrollHeight="500px").  When I remove these settings, the described effect does not occur.  We do have a need to have the scrolling clientsettings enabled as we are showing a substantial amount of columns on the page.  Is this a known issue and is there a suggested fix to my problem?  Thanks.

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 19 Aug 2010, 03:09 PM
Hello Joshua,

I do not observe such a behavior locally. Here is my test page. Which RadControls version are you using?

<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<script runat="server">
 
    protected void RadGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        DataTable dt = new DataTable();
        DataRow dr;
        int colsNum = 24;
        int rowsNum = 0;
        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;
    }
 
</script>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
<head runat="server">
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>RadControls</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
 
<telerik:RadGrid
    ID="RadGrid1"
    runat="server"
    Width="800px"
    OnNeedDataSource="RadGrid_NeedDataSource">
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="500px" />
    </ClientSettings>
</telerik:RadGrid>
 
</form>
</body>
</html>


Greetings,
Dimo
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
Joshua Medor
Top achievements
Rank 1
answered on 19 Aug 2010, 03:39 PM
I was able to fix my issue by specifying a really large value, in pixels, for the MasterTableView.  For some reason, the width of the MasterTableView was getting lopped off the end of the grid when it wasn't being set.  I'm not sure why this would be occurring.  any ideas?
0
Dimo
Telerik team
answered on 19 Aug 2010, 04:06 PM
Probably you are using an older version of RadControls - I think I recall this issue existed in the past.

Regards,
Dimo
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
Joshua Medor
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Joshua Medor
Top achievements
Rank 1
Share this question
or