避免切割数据网格的最后一行

避免切割数据网格的最后一行

问题描述:

嗨*,

我在工作中遇到了一些问题。

I got a little problem at work.

我们有一个与主窗口成比例的3个数据网格大小tablelayoutpanel中每个都有33.3%。

We have a 3 datagrid sized proportionally to the main window with 33.3% for each in a tablelayoutpanel.

问题是,如何避免数据网格的最后显示的行被"切割"。有任何想法吗 ? :)

The problem is, how to avoid last displayed row of the datagrid to be "cutted". Any ideas ? :)

祝你好运

Emmanuel Istace

Emmanuel Istace

 //I hope you asked to remove the last empty row if am right do the below line:            dataGridView1.AllowUserToAddRows = false;            //If you want to remove the last row do the below:            dataGridView1.Rows.RemoveAt(dataGridView1.Rows.Count - 1);