DataGrid Behavior in VS.net 2003

  • Thread starter Thread starter Atley
  • Start date Start date
A

Atley

How do I set my DataGrid to not allow new row additions in Visual Studio
..net 2003?

I just want the users to be able to edit records already placed in the
database previously, not to allow them to add new records.
 
How do I set my DataGrid to not allow new row additions in Visual Studio
.net 2003?

DO NOT CROSS POST.

Set the datagrid to read only and Create a datagridtablestyle and specify if
the textbox is read only for each column.
 
I tried that, it did not work!

I created a tablegridstyle and then marked individule columns as false for
the readonly property...

This just rendered my entire table read-only

What can i do differently?
 
myDataset.myTable.DefaultView.AllowAdd = false

Atley said:
I tried that, it did not work!

I created a tablegridstyle and then marked individule columns as false for
the readonly property...

This just rendered my entire table read-only

What can i do differently?

specify
 
Hi Atley,

Use a dataview (roughly typed here)
\\\\
dim dv as New DataView(mydatable)
dv.AllowNew = False
datagrid1.DataSource = dv
////
I hope this helps a little bit?

Cor

"> I just want the users to be able to edit records already placed in the
 
Hi Scorpion,

Somehow I missed that above and would otherwise not have given my answer or
told with it that is was an alternative.
myDataset.myTable.DefaultView.AllowAdd = false

However I like the dataview as description anyhow more, do not ask me why, I
think just a personal thing.

However sorry.

Cor
 
Back
Top