I want a datagrid with 4 rows only and one column editable.
I've loaded the data, and figured out how to allow one column only to be editable (by setting other columns to readonly.
Problem is, how do I stop the user from inserting new rows
Setting grid to readonly stops editing of column

How do I stop new rows
daniel qi
Bound ur Grid with Datatable.Dataview as
pi_dtTable.DefaultView.AllowNew = False
dgData.DataSource = pi_dtTable .DefaultView
Hope this will help u...........
Reagrds,
Ritesh
Oroborus
Dim CM as currencymanager = ctype(me.bindingcontext(dgchild.datasource,dgchild.datamember),currencymanager
ctype(cm.list,dataview).allownew = false
This way you are not changing the DataSource but you still set the AllowNew as False.
I fo this advice from "jfuentes" for a question I asked.
sdsachs
Set the datagrid's datasource to a dataview instead of a datatable
Dim Dataview1 as new Dataview
Dataview1.table = 'Name of Datatable'
Dataview1.allownew = False
Datagrid.datasource = Dataview1
That should do it for you.
Regards
Finn