Hi Henry,
Thank you for contacting Syncfusion support,
We have analyzed your query and you can resolve this problem by adding Syncfusion.UI.Xaml.Grid.Helpers namespace within the file. When you are trying to get the VisualContailner, you need to use Syncfusion.UI.Xaml.Grid.Helpers namespace in SfDataGrid. And you can get the RowCount by using VisualContainer.RowCount property. Please refer the below code example:
using Syncfusion.UI.Xaml.Grid.Helpers;
private void Button_Click_1(object sender, RoutedEventArgs e)
{
var visualContainer = this.datagrid.GetVisualContainer();
int rowcount=visualContainer.RowCount;
}
|
Please let us know if you require further assistance.
Thanks,
Ashok