Live Chat Icon For mobile
Live Chat Icon

How can I get the number of rows in my DataGrid

Platform: WinForms| Category: Datagrid

One way you can do this is through the BindingManager.Count property.

	int numRows = dataGridDetails.BindingContext[dataGridDetails.DataSource, dataGridDetails.DataMember].Count;

	Dim numRows as Integer = i dataGridDetails.BindingContext(dataGridDetails.DataSource, dataGridDetails.DataMember).Count;

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.