简体   繁体   中英

Infragistics grid row selection of one page is mimicking to next pages

I have an Infragistics grid where the first column is Checkbox column to select the row. Multiple row selection is enabled. Now, the issue is that, the checkbox checked state of one page is persisting to next pages too. For example, if I checked 3rd and 5th row of Grid in first page and navigating to next page, in this case, the previous clicked row position from first page is being mimicked and 3rd and 5th row of this page too is being selected without performing any selection activity on the checkbox.

Is there some property to disable this. What can be the possible reason and how to resolve it ?

Update

<ig:WebDataGrid ID="SampleGrid" runat="server" AutoGenerateColumns="false"
Width="99%" ItemCssClass="gridRow" EnableDataViewState="true"   CssClass="grid"
 DataKeyFields="EO" HeaderCaptionCssClass="gridHeader"   AltItemCssClass="gridRow" OnColumnSorted="SampleGrid_OnSorting" OnInitializeRow="SampleGrid_OnInitializeRow">
<Columns>
<ig:TemplateDataField Header-Text="" Width="4%" Key="ChkBox">
<ItemTemplate>
<als:CheckBox ID="chkPkgNo" runat="server" />
</ItemTemplate>
</ig:TemplateDataField>

Upadate 2

 if(DataSet.Tables[0].Rows.Count > 0){
 GRID.ClearDataSource();
 GRID.DataSource = DataSet.Tables[0];
 GRID.DataBind();
 }

You could disable persistence using this option: http://www.igniteui.com/help/api/2016.2/ui.iggridselection#options:persist

However, persistence shouldn't behave like this. Are you, by any chance, using dummy data that has repeating records and no PK defined? Since persistence is on by default and it relies on having unique identifiers for each row, Selection will try to create some if no PK is defined using the records' checksums. Repeating records will therefore result in repeating ids which may cause the behavior you are experiencing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM