Hi Diogo,
You can achieve your requirement using below code snippet,
C#:
|
void
ShowRowCount(SfDataGrid sender)
{
if(sender.View == null)
MessageBox.Show("Row count:
" + sender.RowCount);
else
MessageBox.Show("Row count:
" + sender.View.Records.Count);
}
|
Note: SfDataGrid.Rowcount returns entire row
counts in this case column header also consider as row.
In SfDataGrid.View.Records.Count returns only records count.
Please check this and revert us if you need further assistance for
this.
Regards,
Dhanasekar M.
Attachment:
WindowsFormsApp11_1a2f1d0b.zip