At the bottom of a DataGridView, there appears to be an empty row for the user to fill out if he/she wants开发者_JAVA百科 to add another row. Is it possible to remove this feature from the DataGridViews I create?
Set the AllowUserToAddRows to false
dataGridView1.AllowUserToAddRows = false;
Set DataGridView.AllowUserToAddRows=False
You can use DataGridView.AllowUserToAddRows property or if you use DataView you can do fallowing:
DataView dataView = new DataView(dataTable);
dataView.AllowNew = false;
dataGridView1.DataSource=dataView;
There are also other properties you can control in DataView: AllowEdit, AllowDelete
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论