Scrolling
RadVirtualGrid exposes a scrolling mechanism which can be utilized through the following methods. As they are processed asynchronously, the scrollFinishedCallback and scrollFailedCallback callbacks can be used when certain actions are required once the scrolling has finished or failed.
- ScrollIndexIntoViewAsync(int rowIndex, int columnIndex, Action scrollFinishedCallback, Action scrollFailedCallback)
Example 1: Calling the ScrollIndexIntoViewAsync method
this.VirtualGrid.ScrollIndexIntoViewAsync(40, 20,
new Action(() =>
{
MessageBox.Show("Finished!");
}),
new Action(() =>
{
MessageBox.Show("Failed!");
}));
- ScrollRowIndexIntoViewAsync(int rowIndex, Action scrollFinishedCallback, Action scrollFailedCallback)
Example 2: Calling the ScrollRowIndexIntoViewAsync method
this.VirtualGrid.ScrollRowIndexIntoViewAsync(40,
new Action(() =>
{
MessageBox.Show("Finished!");
}),
new Action(() =>
{
MessageBox.Show("Failed!");
}));
- ScrollColumnIndexIntoViewAsync(int columnIndex, Action scrollFinishedCallback, Action scrollFailedCallback)
Example 2: Calling the ScrollColumnIndexIntoViewAsync method
this.VirtualGrid.ScrollColumnIndexIntoViewAsync(40,
new Action(() =>
{
MessageBox.Show("Finished!");
}),
new Action(() =>
{
MessageBox.Show("Failed!");
}));