Rad Grid paging

Posted by Ab Himmit on 05-Sep-2016 06:16

Hi All,

I'm using Grid:MasterTemplate:MoveToLastPage() to show the last page of the grid, but doesn't seem to work.
The grid contains 1500 rows.
Does anyone have an idea of showing the last page when the bindingsource has been moved to the last row?

Thanks.

All Replies

Posted by Laura Stern on 05-Sep-2016 08:26

Can you give a bit more detail please.  When you say it doesn't seem to work, what does that mean?  It does nothing?  You get the wrong rows showing?  

Also, what do you mean regarding "showing the last page when the BindingSource has been moved to the last row".  It sounds like you're trying to call MoveToLastPage after you've already scrolled to the end.  But that doesn't sound right.  Maybe you were just being redundant?

Posted by Ab Himmit on 05-Sep-2016 08:47

Hi Laura,

In my code, I'm moving the row selection to last on the grid. So I'm trying a solution to  move the page of the grid. In this case to show the last page of the grid. I'm using Grid:MasterTemplate:MoveToLastPage(), but the grid doesn't do anything. I'm being redundant, moving the bindingsource only does not move the grid.

Thanks.

Posted by Laura Stern on 05-Sep-2016 11:08

So you're goal is to select the last row in the grid programmatically?  I don't know what MoveToLastPage is supposed to do.  The doc is not too clear on it.  Why don't you try something more direct, like setting the CurrentRow property?  The BindingSource has a Count property or you can use the count from the grid's Rows collection.

I would have thought you could also set the BindingSource Position property.  Is that what you tried?  You need to give more explicit information.

Posted by Ab Himmit on 14-Sep-2016 10:03

Found the solution to scroll the radgridview to selected row. Especially when you use a navigation panel.

CurrentRadGridView:TableElement:ScrollToRow(CurrentRadGridView:Rows:IndexOf(CurrentRadGridView:CurrentRow)).

Thanks

This thread is closed