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.
Hello,
This one is very weird, I tried again using different versions and all was working fine - here is my setup and you can see my result on the screenshot:
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> </head><body> <form id="form1" runat="server"> <igtbl:UltraWebGrid ID="UltraWebGrid1" runat="server"> </igtbl:UltraWebGrid> </form></body></html>using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using Infragistics.WebUI.UltraWebNavigator;using System.Data;using Infragistics.WebUI.UltraWebGrid;public partial class _Default : System.Web.UI.Page { protected override void OnLoad(EventArgs e) { base.OnLoad(e); UltraWebGrid1.DisplayLayout.UseFixedHeaders = true; UltraWebGrid1.DataSource = getTable(); // any sample table UltraWebGrid1.DataBind(); } private DataTable getTable() { DataTable dt = new DataTable(); dt.Columns.Add("Col1"); dt.Columns.Add("Col2"); for (int i = 0; i < 10; i++) { DataRow row = dt.NewRow(); row["Col1"] = "Col1 Data " + i; row["Col2"] = "Col2 Data " + i; dt.Rows.Add(row); } return dt; }}
At this point I believe there are two options:
1) Contact Developer Support directly with the sample project so that they can see if there is something else affecting the grid. Developer Support can be reached here:
http://ko.infragistics.com/Support/default.aspx
2) Download the latest version 2008.3 and give it a try and see how it goes
I am having exactly the same problem. I am using the infragistics ver 8.2 CLR 2.0
I tried in the following sequence in the PageLoad (http://forums.infragistics.com/forums/p/3438/19613.aspx#19613), but still it is not working as expected. I even tried to place these attributes in the aspx page, but not working as expected.
this.UltraWebGrid1.Bands[0].Columns[0].Header.Fixed = true;
this.UltraWebGrid1.DisplayLayout.StationaryMargins = StationaryMargins.Header;
I am afraid to try on 8.3 CLR 3.5 because that has another problem with related to StationaryMargins - the grid won't display rows when there is only one record in the data, we have to manually check this condition and set the stationary margin to none. Is there any hot fix for these bugs?!!
Please, take a look at the following forum thread for more insight on this issue
http://forums.infragistics.com/forums/t/14517.aspx
For information on whether this is a bug and if it is fixed I think it is best to contact developer support directly.
Did anyone find a solution to the data disappearing problem.
I have the exact same issue. As soon as I do UseFixedHeaders = True, my data disappears from the grid. Weird thing is when I pick a value from my filter in the column header, all the data shows up.
Another discovery.... my content is inside a masterpage - content placeholder. When I put my my aspx contents into a regular web page (without the content placeholder), then the fixed header stuff works perfect.
So something to do with masterpages??
I too am having this problem, except I am trying to make both my Headers and Footers stationary (which they are). But when the grid renders, the data rows are not showing. I am also using a Master Page/Content Page setup.
One thing I did notice is that if my dataset was small, and didn't fill the entire height of the grid, it would not show up until I tried to adjust a column width. But the grid rows would be slightly skewed, and did not line up properly. This cascaded down to the footer as well, where I display a total of the above rows.
But, if my data set was large enough to fill the entire height grid, it would show up right away, and my headers, footers and the first column were fixed (like I wanted them to be). Scrolling both horizontally and vertically worked properly.
So this sounds like a bug with the WebGrid module. My next step is to issue a bug fix request.
Thanks, Mark
This is a legitimate issue. I have the same problem and see that the previous post is the same issue (Master page). However I would add that this only happens when I publish my project to the server. Locally it works as expected. Any thoughts ? Anyone?
I have found this issue when I am using master pages.
When I use a regular page, the data loads correctly when I have the UseFixedHeaders (UFH) flag set to true. If I place the control on a content page (one that uses a master page), the data is missing with the UFH flag set to true. If the UFH flag is set to false, the data is displayed.
I have confirmed that the data is on the page (view page source), it is just that it is not showing on the screen.
I believe that this is to do with the fact that master pages manipulate the control ID's and the control is incapable of dealing with this.
I haven't figured out a way to get this to work, but have reverted to regular pages for now, but this might help someone else to figure out the steps that need to be taken to get this to work.