Multiselect with virtualization

4 posts, 0 answers
  1. Manoj
    Manoj avatar
    4 posts
    Member since:
    Aug 2015

    Posted 18 Mar 2016 Link to this post

    Can you please share example for "selectable: 'multiselect'" with virtualization enabled for grid. The page size is 50. if data is more than 1000 rows, if user selects all the 1000 rows then select() method always returns 10-55 rows randomly. Also how to maintain the selection with scroll. since grid renders only current page.
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 22 Mar 2016 Link to this post

    Hi Manoj,

    Check this how to example as it demonstrates how to maintain the selected items during paging (virtualization uses paging).


    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Manoj
    Manoj avatar
    4 posts
    Member since:
    Aug 2015

    Posted 22 Mar 2016 in reply to Alexander Valchev Link to this post

    Thanks..but the example you shared only demonstrates the pagination....but pagination with virtualization does not have all the rows rendered in the grid. so if there are 1000 rows in a grid (with page size 100) and user selects 1st row and then shift click 1000th row. then there should be a way to get all the selected rows. I think current implementation is based on class "k-state-selected" and it does not return the rows which are not in the current view. can you please share an example of pagination with virtualization with 1000 rows and page size of 100 and user can select all the rows using shift+click?
  4. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 25 Mar 2016 Link to this post

    Hi Manoj,

    The idea of the virtualization is to render the rows on demand. Rendering all rows will slow down the Grid or even crash the application if there are too many rows.

    If you use the approach demonstrated in the "how to" example which I provided you will have the IDs of the selected records (the `selectOrders` array). It is not possible to get all the <tr> elements, it is possible to store the data records or their IDs.

    Regards,
    Alexander Valchev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top