Hi
sfdatagrid Rows collection doesn't exist.
The following code give me the number of rows. Is it the best practice to get the number of rows ?
public partial class OrderInfoRepositoryView : ContentPage
{
public OrderInfoRepositoryView()
{
InitializeComponent();
//BindingContext = vm.OrderInfoCollection;
SfDataGrid dataGrid = new();
OrderInfoRepositoryViewModel viewModel = new();
dataGrid.ItemsSource = viewModel.OrderInfoCollection;
}
private void GetNumberofRows_Clicked(object sender, EventArgs e)
{
var nbOfRows = viewModel.OrderInfoCollection.Count;
DisplayAlert("Number of Rows", $"the number of rows is {nbOfRows}.", "ok");
}
}