Hi,
I am using the following code to allow fixed headers
ReportView.DataSource = dt;// data table ReportView.DataBind();
ReportView.DisplayLayout.UseFixedHeaders = true;
But I cant see any data in the web grid. However, whe I export to excel, all the data gets exported to excel, which means that the data is there for some reason, its not visible (like setting background, border and forecolor everything to white).
When I comment the last line however, I see the data.
Any help will be highly appreciated.
Thanks,
Sameer
Hello Sameer,
I am trying to reproduce the problem (using the latest 2008.3) release, but unfortunately to no avail. In every case I tried, UseFixedHeaders worked as expected for this feature and the grid was successfully shown.
Furthermore, it is really weird that UseFixedHeaders has this effect on the grid - are you sure that this is the only line of code the interferes in the scenario? Can you isolate a very simple grid and see how UseFixedHeaders affects it?
Thanks for your quick response.
Sorry for not mentioning this earlier, I am using 2007.3 version.
Yes, I have managed to replicate the issue in a very simple case.
I have the following code in the Page Load event
UltraWebGrid1.DisplayLayout.UseFixedHeaders = true; // uncommenting this makes the data visible again
UltraWebGrid1.DataSource = getTable(); // any sample table
UltraWebGrid1.DataBind();
{
DataTable dt = new DataTable();
dt.Columns.Add("Col2");
row["Col1"] = "Col1 Data " + i;
dt.Rows.Add(row);
}
I have not changed a single porperty after adding the grid to the page.
<head runat="server">
</head>
<body>
<form id="form1" runat="server">
<div>
<igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server">
</igtbl:UltraWebGrid>
</div>
</body>
</html>
Am I missing something? I need to demo the Grid capabilities to my manager today, and I really need to get this to work. I appreciate your help.