I make a service call to get data for my grid, upon return I set the data to my grid then I set the ActiveCell.
I then call:
this.XamGrid.ScrollCellIntoView(this.XamGrid.ActiveCell);
Sometimes it scrolls a little depending on how many rows I have but it never actually gets the last row into view. Can I just force the scroll bar to scroll to the very bottom?
I always want the active row to be the last row
Hello gmcalab,
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support
I wouldn't recommend using VisualTreeHelper, as its always a possibility of the the VisualTree changing between Releases or even SRs.
Instead, you should just derive from the xamGrid and use the VerticalScrollbar proprety we expose.
The code would then look like this:
this.VerticalScrollBar.Value = VerticalScrollBar.Maximum;
-SteveZ
So I used the VisualTreeHelper and I have a reference to a ScrollBar with the name or VerticalScrollBar....
Is this the correct scrollbar and if so how can I set the max value?
Hi,
The xamGrid should always scroll the entire row into view.
It's a bug if it isn't, but i can't seem to reproduce that behavior. If you have a sample that shows the problem that'd be great.
As far as control over the scrollbar, we don't expose anything publicly.
However, you could derive from xamGrid, and access the VerticalScrollbar property, which is protected, and add your own method, that tells it to scroll to it's max value.
bump.
Anyone?