我使用以下代码来计算datagrid行,但它仅适用于按钮.我想要文本框中的总行数,但随着行数的增加它不会增加.
int numRows = dataGridView1.Rows.Count; txtTotalItem.Text = numRows.ToString();
c#
c# ×1