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.