datagrid items count c# code example
Example: c# datagridview count value
var count = this.dataGridViewArticles.Rows.Cast<DataGridViewRow>().Count();
var countjustX = this.dataGridView1.Rows.Cast<DataGridViewRow>()
.Count(row => row.Cells["RisFin"].Value == "X");
this.textBox1.Text = count.ToString();