I have a form with two tabs on it. One tab's UltraGrid is loading its data properly. The other tab, with a similar grid and code, is not loading its data. The data source has data in it, and I can see it being set to the UltraDataRow, however, it just won't show any data rows.
UltraDataRow missionRow = af664DataSource.Rows[0];// The data fields set here contain datamissionRow["To Date"] = fltRecAf664.MissionToDateTimeDt;missionRow["Aircraft Organization Home Station"] = fltRecAf664.TranBaseNameNm;missionRow["CMD"] = fltRecAf664.CmdCd;missionRow["MDS"] = fltRecAf664.MdsCd;missionRow["Serial Nbr"] = fltRecAf664.SerialNbr;
UltraGrid shows the columns, but no data rows (should be one row)
Is there a step I'm missing to have the data show up? I'm using similar code as the tab that is working and can't tell the difference and why it won't work.
Hello Sam,
Thank you for contacting Infragistics. How are you loading data? What datasource is used and when are the two grids binding? Can you reproduce the behavior? If so, please provide a sample demonstrating the behavior otherwise we will require a full designer.cs and/or code behind for the form to attempt to reproduce this on our end.
Sorry about the lack of detail. The data source is specified during design time, and the grid's data source property points to it. I'm new to this and I am maintaining a system that uses it. The other tab works fine, and I can't tell the difference between it and the tab that I'm working on. However, only the new tab is not loading data.
I see this in the designer of the first form (tab): this.missionGrid.DataSource = this.af781DataSource;
I see this in the designer of the second form (tab): this.missiongrid.DataSource = this.af664DataSource;
These are the only references to setting the data source that I can find.
Thanks, I went with the instructions from Infragistics instead of trying to copy what was already done on the other form. It's still a work in progress, but hopefully it will start working.
Currently, after setting the grid data source to a List<T> it shows the column headers, but still no data. I don't know if I should define the columns in the data source beforehand, or let it figure out the columns from the List<T> collection. The grid looks weird, like something is behind the headers, but I can't tell what it is.
Great!
So normally the grid will never do that. I would start removing any appearances set in either code or the designer. You can click the grid in the designer and view the property window and see what is bolded. If you can't see any thing that might be triggering this then it could by a style loaded into the app, something we've developed called AppStyling. See if a stylist is loaded into the app. You can try turning off the UseAppStylist property on the grid to isolate this.
Using .ToArray() on the collection fixed the issue with binding the datasource. The data is still not showing up on either of the grids, but I'll keep working on it.
Let me know where you are at and whether you need any further assistance.
I'm sure there are best practices and certain ways of doing things, but for now I'm just trying to get it to work enough to meet a deadline and I will improve it later.
Thank you for your help, I think we can mark this as resolved.
I can't explain any of the issues without seeing some code unfortunately. Let me know if you can send me any files.