Is there a way to get a collection of displayed / loaded rows when the UltraWebGrid is set to LoadOnDemand="Xml"?
I need a way to loop through a collection of displayed / loaded rows to determine if a checkbox in the first column of every row is selected or not. The property ultraWebGrid.Rows works fine if the grid is not set to LoadOnDemand="Xml". But otherwise it only displays the first 50 rows (50 is set as the default value of the RowsRange property).
Doe's anybody know to get around this problem?
The reason you are able to see only 50 rows is because of the RowsRange property of the grid. By Default it is set to 50.
When using LoadOnDemand.Xml in conjunction with Paging, the RowsRange should be set to the same value as the PageSize.
The grid's Rows collection already represents the collection of displayed/loaded rows.
Except when your load-on-demand type is set to Accumulative, every time you post back the grid's Rows collection is cleared. That's why you're seeing the first RowsRange worth of rows each time.
One option to address this may be to set your grid's DisplayLayout.XmlLoadOnDemandType property to Accumulative (Infragistics.WebUI.UltraWebGrid.XmlLoadOnDemandType.Accumulative), so that previously-loaded rows remain loaded when you post back.
Another option would be to maintain a list of which rows include a checked value in the desired column. You can update this list using the UpdateRow event of the grid, which is raised through an AJAX callback whenever a row is changed, once either the active row is changed to another row or the grid loses focus.