简体   繁体   English

一页的基础设施网格行选择正在模仿下一页

[英]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.我有一个 Infragistics 网格,其中第一列是Checkbox列以选择行。 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.例如,如果我在第一页中检查网格的第 3 行和第 5 行并导航到下一页,在这种情况下,正在模仿第一页中上一个单击的行位置,并且此页的第 3 行和第 5 行也被选中而不执行复选框上的任何选择活动。

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更新 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您可以使用此选项禁用持久性: 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?您是否有机会使用具有重复记录且未定义 PK 的虚拟数据? 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.由于默认情况下持久性是打开的,并且它依赖于每一行的唯一标识符,如果没有使用记录的校验和定义 PK,Selection 将尝试创建一些。 Repeating records will therefore result in repeating ids which may cause the behavior you are experiencing.因此,重复记录将导致重复 ID,这可能会导致您遇到的行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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