This is a migrated thread and some comments may be shown as answers.

Select in Grid bug?

3 Answers 115 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dr.YSG
Top achievements
Rank 2
Dr.YSG asked on 28 Jun 2012, 05:01 PM
Are other people noticing this:

I have a Grid with         selectable:"multiple, row", and pageable set to true. When there are multiple pages, the selections that I made on page 1, will disapear (no longer be highlighted in blue) when I switch to page 2, and then back to page 1.

However, this is only a visual bug. calling .clearSelections()  or .select() with no parameters will still find all the ones that are selected.

In addition. Let's say that I have 300 rows, at 30 items per row. If do a:

grid.select(grid.tbody.find(">tr[data-uid]"));
console.debug("Selected all " + grid.select().length);

then I see that 300 items were selected. But visually on the items on the page that is displaying will get the blue highlight. None of the other pages visually show that they are selected.

3 Answers, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 29 Jun 2012, 01:50 PM
Hello Yechezkal,

As you may know grid selection is not persisted by default when the Grid widget is rebound for example when paging, sorting etc.

Regarding you other questions I am unable to observe such behavior locally. Please take a look at this short screen capture. And here you can find the sample used in the video. Please let me know if I'm missing something obvious.

All the best,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dr.YSG
Top achievements
Rank 2
answered on 04 Jul 2012, 04:07 PM
Rosen,

I did not know (nor did I see documentation) that select is lost for: filtering, sorting, paging, grouping, etc.

That is very unfortunate for my application (and perhaps others) since I am using the grid like KAYAK.COM does to allow a person to make persistent selections (of items in a large catalog). The user sorts, groups, etc, and then grabs sections which become a selected subset of size 50 or so out of a catalog of 10K or so. (the backend database is 30M records!). So persistence is key!!

I suppose I can disable selection and do my own managed selection that would persist over grouping/paging/sort etc. (a new column in the datasource). Given your crystal ball on where TELERIK is going, is this the best choice? (i.e. I don't want to conflict with your future plans).

Is there a USER VOICE request for persistent selections? I believe that your grid is a great tool for helping users sort/filter and group large data and make selections from it - and others will discover this as BIG DATA to mobile and web becomes more prevalent.



0
Rosen
Telerik team
answered on 05 Jul 2012, 07:18 AM
Hi,

Although, persisting the selection is not available as built-in option, you may implement in yourself by using Grid change and dataBound events. Here is very basic implementation of such approach.

All the best,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Dr.YSG
Top achievements
Rank 2
Answers by
Rosen
Telerik team
Dr.YSG
Top achievements
Rank 2
Share this question
or