I am using VB.Net and have a very simple form which contains a DataGrid and a few buttons. I want the user to be able to edit the cells in the datagrid but I do not want the user to be able to add new rows by using the "*" row at the bottom of the grid. I would like this "*" row to not exist. I have found the dataview property called AllowNew but no matter how I set this field (true of false) the "*" row always appears and new rows can be added. I must be binding something wrong. I would like some help getting this functionality working correctly Thank you.
Here is the basic outline of my code right now:
Create a Datagrid.
Add the DataGrid control to my form.
Create a DataSet
Create Tables
Add the Tables to the DataSet
Add Columns to the Tables
Bind the DataSet to the DataGrid
then
Dim myDV As DataView
myDV.Table = ds_ClassRoom.Tables(CLASSROOM_TABLE)
myDV.AllowNew = False
myDV.AllowDelete = False
Here is the basic outline of my code right now:
Create a Datagrid.
Add the DataGrid control to my form.
Create a DataSet
Create Tables
Add the Tables to the DataSet
Add Columns to the Tables
Bind the DataSet to the DataGrid
then
Dim myDV As DataView
myDV.Table = ds_ClassRoom.Tables(CLASSROOM_TABLE)
myDV.AllowNew = False
myDV.AllowDelete = False