3

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();
 }
user1197114
  • 63
  • 1
  • 3
  • 9
  • it will most probably be some CSS classes they apply to style it as selected. You can manually remove those and apply to the first row, but if you ask on their forums i'm sure someone would have already gone through that and given a decent answer. – Rex Jan 06 '17 at 15:00
  • Do you need to use the EnableDataViewState=true? – Konstantin Dinev Jan 10 '17 at 15:42
  • @KonstantinDinev Yes, it is required, so that I can see the rows selected if I come back to previous pages of the grid – user1197114 Jan 10 '17 at 17:28

1 Answers1

1

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.