简体   繁体   中英

Infragistics Grid Selection

I am using Infragistics Grid in my web application. I have checkbox inside a template field. My grid has a paging too. when I do selection of some rows and go to next page my selection is not persisting. Is there any property which we need to set?. Also I saw that there is Row Selection property but in my case I have a checkbox control inside my grid. How to maintain my selection over paging.?

There is no property which persists selection in the WebDataGrid for pages that are currently not loaded. This is so because the WebDataGrid paging is entirely performed on the server-side and the grid is rebound every time the current page index is changed. The old row objects are disposed and new row objects for the current page are created. Implementation is such for performance reasons.

In order to persist selection, you would have to do a little bit of custom implementation. Keep track of the key of your selected row in code behind, and every time the grid is rebound, check whether the key is present in the current row collection and mark the row as selected.

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