The situation is the wingrid has so many rows, about 1500 rows. I think it's not convinent for users. So I want to make the wingrid display in several pages, but I can't find some properties to do this thing.
Do I need to write code to so or I didn't find the property for paging display ?
Thank you!
I need to do this and am very new to infragistics.
can you post some code sample. I have a grid with 2 bands (parent/child)
I am using a bindinglist and not a datasource for my grid
Thanks
It's been a while since I worked with this, but I don't think you should be settng the count on the child collection at the same time you set the parent collection. Doesn't the event fire for each collection individually?
I'm not sure why you would want to do that, anyway. The point of setting the count is so that the scrollbar adjusts properly. But the scrollbar doesn't need to account for child rows until after a parent row is expanded.
I set the grid have parentBand and childBand. I have
Sub UltraDataSource1_InitializeRowsCollection(...)
If "ChildBand1" Is e.Rows.Band.Key Then
m_childCount = GetTotalRowNum(e.Rows.ParentRow.Tag)
e.Rows.SetCount(m_childCount)
End if
End Sub
Which is working very well for all the parentRows except the parentRow of index = 0. (The 1st Row)
I found the UltraDataSource1_InitializeRowsCollection sub is called and the childBand case is implemented when the ParentRows are created which I do not understand. Of course, since the ParentRows(0) is not created and the childBand of that wanted the e.Rows.ParentRow.Tag which is DBNull, it errored at that point. Therefore, the childBand's setCount as 0. And I cannot expand the 1st ParentRow to see the childBand Rows.
Is this a bug? Otherwise, is there any way to make the 1st ParentRow expandable to display its child Rows?
Thank you.
No, there's no way to do that. I assume you are setting the row count on the UltraDataSource, so the grid's scrollbar should correctly represent the number of rows. CellDataRequested fires any time the grid requests data, and there's no way to stop the grid from requesting data for rows it needs as you scroll.
If you set ScrollStyle to Deffered, there may still be other reasons why the grid needs to access the rows, such as tooltips.
OK... I've got it worked. Now when I scroll down the UltraGrid, every 1000 rows it triggers go to DB and
get another new 1000 rows.
Now, I'd like make the UltraGrid scrollable to anywhere in the grid without that triggering.
The triggering happens only when I am done with scrolling.
Is there any way to override UltraDataSource_CellDataRequested while scrolling and make it is called only when I release the scroll bar?
I switched between Deffered and Immediate of Scroll Style of UltraGrid, however, both of them triggered the UltraDataSource_CellDataRequested while scrolling.