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

grid drag and drop - paging help

4 Answers 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gregor
Top achievements
Rank 1
Gregor asked on 08 Jun 2012, 10:50 AM
I have a treeview and a grid working very nicely - one issue I have though is when the grid has a page size of 11 items and paging set to 10.
If I go to page 2 and see the one item on it and drag this item from the grid dropping into onto the treeview the grid pager at the bottom reflects this and only shows one which is good, but i need the grid to display page 1. At the moment the pager says 1 at the bottom but you have to click on that to see the items on page 1 of the grid - what event can i fire so that when i drag the last row on page 2 over to the treeview the grid will show page 1

Thanks
Gregor

4 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 13 Jun 2012, 06:50 AM
Hello Gregor,

Indeed this is expected behavior. To change the currently displayed page in the Grid widget you will have to page the DataSource.

All the best,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Gregor
Top achievements
Rank 1
answered on 22 Jun 2012, 01:40 PM
Hi There

The documentation is a little unclear, if I have say 10 pages of data and on the very last page there is 1 item on the grid, if this is removed I want to be able to force the grid to load the previous page ie the 9th page of data.

Ive tried stuff like :-

grid.refresh();
var currentPage = grid.dataSource.page();
alert(currentPage);
   
0
Accepted
Nikolay Rusev
Telerik team
answered on 26 Jun 2012, 08:26 AM
Hello Gregor,

Here is one way to implement this:
http://jsfiddle.net/gJBeW/

Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Gregor
Top achievements
Rank 1
answered on 26 Jun 2012, 12:18 PM
Hi Nikolay

Worked a treat many thanks.
Tags
Grid
Asked by
Gregor
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Gregor
Top achievements
Rank 1
Share this question
or