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. Image for the cookie policy date

Scroll SFDataGrid programmatically

Hi,

I tried to use SFDataGrid.ScrollInView(RowColumnIndex) to scroll the datagrid programmatically but no lucks.
Could you please advise if there is anyway to do so?

1 Reply

AR Akila Rajaram Syncfusion Team July 18, 2014 01:03 PM UTC

Hi Tony,

You can use the same method SfDataGrid.ScrollInView(RowColumnIndex) to scroll the datagrid programmatically based on that specified row and column index value. We thought that you have specified the row and column index value which is not already visibled in the grid. Please refer the below code snippet,

Code snippet:

private void Button_Click_1(object sender, RoutedEventArgs e)

{

           

  for (int i = 0; i < 500; i++)               

   {

       this.datagrid.ScrollInView(new Syncfusion.UI.Xaml.ScrollAxis.RowColumnIndex() { RowIndex = i, ColumnIndex = 3 });

   }

}

Please let us know if you have any other queries.

Regards,

Akila


Attachment: ScrollSample_3c3b3171.zip

Loader.
Up arrow icon