We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

GridControl Scrolling from Button

Thread ID:

Created:

Updated:

Platform:

Replies:

101514 Oct 31,2011 05:30 AM Nov 10,2011 11:17 PM WPF 1
loading
Tags: GridControl
Christopher Baker
Asked On October 31, 2011 05:30 AM

Hi,

Is there a way to control the scroll of the grid left and right with a button using the MVVM pattern? I have button on the view that commands to the view model, how can this issue a scroll left right to the GridControl?

Thanks
Chris


Jawahar Jeevanandan J [Syncfusion]
Replied On November 10, 2011 11:17 PM

Hi Christopher,

Thank you for your patience.

You can achieve your requirement by using the below code snippet,

Code snippet[C#]

private BaseCommand _moveLeft;

public BaseCommand MoveLeft
{
get
{
_moveLeft = new BaseCommand(DoMoveLeft);
return _moveLeft;
}
}

private void DoMoveLeft(object param)
{
GridControl gc = param as GridControl;

RowColumnIndex rc_l = new RowColumnIndex();
rc_l.RowIndex = 1;
rc_l.ColumnIndex = 1;
gc.ScrollInView(rc_l);
}

Code Snippet[XAML]



For your convenience, We have also attached the sample and please find the sample in the below location,

Sample: http://www.syncfusion.com/downloads/Support/DirectTrac/86766/WPFGCScrolling-1635717338.zip

Please follow incident 86766 for further follow up on this query

Thanks,
Jawahar.




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;