The ultragrid that I am working has three level bands in it and for some reason the Level 3 band is not visible.I am using ultraDataRow.GetChildRows(childBandName).SetCount(5) to create new rows on the grid.On click of a button column on a row(Level 2), I am doing the following.1. Get the DataRow object using the row.ListObject of the current row2. Set the count to currentDataRow.GetChildRows(childBandName).SetCount(5)3. Set the row.Tag with the actual class object in the InitializeDataRow event4. OnCellDataRequested event, the column data is set for all the rows5. I am able to peek the data in the InitializeRow event of the Grid while debug
but the new band is not visible after all the above.
Points to Note:1. Level 2 band works perfectly fine, added a new band to level 2 and it is visible but the issue is only with Level 3 band2. Checked the Band visibility properties in InitializeRow event and the band is not set to hidden3. Developed a sample application on the same machine and Level 3 is visible without any issue
Please suggest what else to check.
Hello,
In order to add a row per band you would use the AddNew method like so:
uwGrid.DisplayLayout.Bands(3).AddNew()
Please try this and let me know if you have any issues. For more details please visit: Adding Rows to WinGrid Programmatically
Also, it would appear that you are loading your data asynchronously, is this correct?
Please provide a sample demonstrating the behavior or relevant code. The behavior you described is not familiar.
Let me know if you have any questions.
Hi Michael,
Thanks for your suggestion.
AddNew() method works on the Level 2 band but on the Level 3 band.
I found a workaround that if I show a message box just before calling the method SetCount(), it works.
So I think this is to do something with the focus/state of the ultra grid control.
I am assigning the data to the DataRow object in the InitializeDataRow() and setting the cell data in OnCellDataRequested event.
If this does not give a hint then I will post the same application.
As I mentioned that sample application works perfectly but the third level band is not visible in my work place without showing a message box.
Yes this code works perfectly fine.
At my office we use the version 2014.1 and it worked on my home laptop as well when I installed a trial version(most recent) last weekend.
Do you see any issues with the methodology?
If the issue is working with 18.1 but not in 14.1 that would mean something was either fixed or masking the issue. If you can upgrade to 18.1 that would be preferable. 2014.1 is no longer maintained and retired.
The sample application that I shared above works on 18.1 and 14.1 both perfectly.
But the level 3 band is not visible on the application at my work place.
I have spent lot of time on the code but could not figure out what the issues is.
The workaround to show a message box to make the band visible works for now, but is not an ideal solution.
I am guessing by making changes to the code, probably in an event would fix the issue, but I am not sure where.
This is most likely a timing issue because you are implementing load on demand with the UltraDataSource.
There are Windows Forms samples in our Samples Browser (an application you can optionally install) that will help guide you to using virtual mode properly using the UltraDataSource. Perhaps following how we do this might address the issues your application.
All of our samples are installed and saved locally by default to Public Documents location on the C Drive:
==> C:\Users\Public\Documents\Infragistics\201x.x\Windows Forms\Samples
In addition, would it be possible for you to send your entire application (privately of course)? I can sign an NDA,etc. Our goal is to reproduce and isolate the behavior to identify the root cause before providing you with a viable solution.
Hi is there any further update on this? I too am now seeing this behaviour, the third level band in my grid no longer displays. This used to work so I have a suspicion that something has changed in the Infragistics code around this? I am using v19.1.20191.150.
My grid is bound to a DataSource with 10 levels of bands, after assigned the DataSource to the grid and looking at the DisplayLayout.Bands collection I only see 2 bands.
This is most likely a problem with the data source. What kind of DataSource are you using? If it's something custom, then the implementation might be returning null for the child data in the first row and first child row, which means that the BindingManager will be unable to get the data structure from the data source for that level.
If you are using an existing data source class, like a DataSet or UltraDataSource then that sort of thing shouldn't happen.