Hi Martin,
I am using SelectionPersistence.js you provided to me.
I am enabling filtering with selection persistence.
Here is the grid code and associated events.
<script> $.ig.DataSource.prototype.settings.paging.pageIndexUrlKey = "page"</script>@(Html.Infragistics().Grid(Model.Customers.AsQueryable()).Width("400px").Height("300px").AutoGenerateColumns(false).ResponseDataKey("Records").Features(feature =>{ feature.Filtering().Type(OpType.Remote); feature.LoadOnDemand().ChunkSize(10).LoadTrigger(LoadTrigger.Button);}).DataSourceUrl(Url.Action("GetAllC")).DataBind().Render())
Here are event I attached
var sp; $.ig.DataSource.prototype.settings.paging.pageIndexUrlKey = "page"; $(document).on("iggridrendered", "#myIGrid", function rendered(evt, ui) { sp = SelectionPersistence(ui.owner); sp.enableFiltering(); });
Issue #1: With above code persistence works fine. But I error in below deselecting scenario
1. Select a row.
2. Filter(remote)--enter some characters in filter text box for any column
3. Remove text from filter text box
4. Try to deselect a selected record.
5. I get the error when deselection row at row index 1:
Unhandled exception at line 366, column 12789 in http://cdn-na.infragistics.com/jquery/20132/latest/js/infragistics.lob.js
0x800a138f - Microsoft JScript runtime error: Unable to set value of the property '1': object is null or undefined.
6. I do not get this error when I user selection with sorting. It is coming only with filtering.
7. I used IE 9(standard mode)
Issue 2: When I enable LoadOnDemand for grid, and do below operations, I see that some issues mentioned below
1. I have chunk size as 10
2. I select record in 2nd row and 3rd row
3. I filter grid for record which is not in 1st chunk. Grid bring data remotely, I select it which happened to be record 11 and removes text from filter.
4. Again, 1st 10 records are displayed with 2nd and 3rd row selected.
5. Now I press LoadOnDemand button at the bottom of the grid.
6. Row 11 is not selected. (How to make sure that on loadOnDemand, selection persistence works).
I hope I am clear now.
I thankful for your valuable inputs.
Thanks,
Rajesh
Hello Rajesh,
I was able to reproduce your Issue 1 after I read your post here: https://es.infragistics.com/community/forums/f/ignite-ui-for-javascript/74989/iggridselection-selectedrows/437781#437781
The issue comes from the igGridRowSelectors feature which was not present in this thread sample. I've added a fix for this in the SelectionPersistence.js file which you can find attached to this forum post.
Best regards,Martin PavlovInfragistics, Inc.
Hello Martin,
I want to thank you for the fix you provided. Both issues I raised are fixed.
Thank you very much,
Rajesh Varade