|
async private void ScrollDown_Click(object sender, RoutedEventArgs e)
{
for (int i = 0; i <= this.datagrid.View.Records.Count; i++)
{
this.datagrid.ScrollInView(new Syncfusion.UI.Xaml.ScrollAxis.RowColumnIndex(i,0));
await Task.Delay(100);
}
}
async private void ScrollUp_Click(object sender, RoutedEventArgs e)
{
for(int i= this.datagrid.View.Records.Count;i>0;i--)
{
await Task.Delay(100);
this.datagrid.ScrollInView(new Syncfusion.UI.Xaml.ScrollAxis.RowColumnIndex(i, 0));
}
} |
|
async private void ScrollDown_Click(object sender, RoutedEventArgs e)
{
//Scroll up
if (clickCount %2 == 0)
{
for (int i = 0; i <= this.datagrid.View.Records.Count; i++)
{
this.datagrid.ScrollInView(new Syncfusion.UI.Xaml.ScrollAxis.RowColumnIndex(i, 0));
await Task.Delay(100);
}
clickCount++;
}
Else //Scroll down
{
for (int i = this.datagrid.View.Records.Count; i > 0; i--)
{
await Task.Delay(100);
this.datagrid.ScrollInView(new Syncfusion.UI.Xaml.ScrollAxis.RowColumnIndex(i, 0));
}
clickCount--;
}
}
|