Hi,
I'm using infragistics version 10.3. I have a problem with the EnableCrossPageSelection property of webDataGrid.This is my webdatagrid:
<
ig:WebDataGrid ID="WebDataGrid1" runat="server" Width="100%" EnableDataViewState="True" AutoGenerateColumns="false" AjaxIndicator-BlockArea="Control" AjaxIndicator-Enabled="True" AjaxIndicator-BlockCssClass="WebDataGridAjaxIndicatorBlock" EnableAjax="false">
<Columns><ig:BoundDataField DataFieldName="ID" Key="ID"></ig:BoundDataField>...</Columns
>
<Behaviors><ig:Selection Enabled="true" CellClickAction="row" RowSelectType="Multiple" EnableCrossPageSelection="true"></ig:Selection
<ig:Filtering Alignment="Top" Visibility="Visible" Enabled="true" AnimationEnabled="false"
/>
<ig:Paging PageSize="100" PagerAppearance="Bottom" Enabled="true" QuickPages="1" PagerMode="NumericFirstLast" />
</Behaviors
</ig:WebDataGrid>
This is the issue:
If paging is enabled, When I select rows from the first page and the second page, the result of WebDataGrid1.Behaviours.Selection.SelectedRows.Count is correct. It gives me the number of total records that I selected. But If I access one especific record from SelectedRows it always gives me Nothing. Example:
First Page - 1 line selectedSecond Page - 2 lines selectedAfter PostBack it gives me: WebDataGrid1.Behaviours.Selection.SelectedRows.Count = 3 WebDataGrid1.Behaviours.Selection.SelectedRows(0) = Nothing WebDataGrid1.Behaviours.Selection.SelectedRows(1) = Nothing WebDataGrid1.Behaviours.Selection.SelectedRows(2) = Nothing
What can I do to solve this?
Thanks
Hi soniaalves,
When the row is not in the current data, we return null because we cannot find it. You can still access the row id pair of that selected row using GetIDPair(int index). You could use the data key in that to do some operation.
regards,David Young