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

Setting selectitem from viewmodel / Paging...

1 Answer 44 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alexander Kotchkin
Top achievements
Rank 1
Alexander Kotchkin asked on 24 Mar 2011, 05:21 PM
Hello,

I have a Gridview with Client side paging.  When I set the selected Item from the View Model, and the item is not on the current page, how can I make the gridview jump to the corresponding page? Is this possible?

Thanks,

Jesus

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 25 Mar 2011, 09:28 AM
Hi Jesus Janne,

The only way to do that would be to calculate on which page will the new selected item be, move to that page and then select it. That is because when there is paging, RadGridView is totally unaware that there are pages other than the one it is currently showing. In fact, it is totally unaware that there is paging at all -- it "thinks" that someone is simply setting a new ItemsSource with [PageSize] number of items, each time the page is changed.

I hope this helps.

Greetings,
Ross
the Telerik team
Tags
GridView
Asked by
Alexander Kotchkin
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or