The DataView associated with the DataGrid's datasource has a AllowNew
property that you can set. If the grid's datasource is a dataview, you can
set it directly on your dataview. But if you datasource is a
dataset/datatable, you need to do a little more work to get at the DataView
being used through the CurrencyManger object.
Dim cm as CurrencyManager =
CType(Me.DataGrid1.BindingContext(Me.DataGrid1.DataSource,Me.DataGrid1.DataM
ember), CurrencyManager)
Dim dv as DataView = CType(cm.List, DataView)
dv.AllowNew = False
If you are using hierarchical data, see
http://www.syncfusion.com/faq/winforms/search/653.asp for a sample event
handler when you can set this property for the child grids.
==========================
Clay Burch, .NET MVP
Visit
www.syncfusion.com for the coolest tools
"Adriano" <(E-Mail Removed)> wrote in message
news:u59ci$(E-Mail Removed)...
> hello,
>
> what's the way to hide the last row of DataGrid (the one for inserting new
> data),
> so my users can't insert newdata but only update and delete?
>
> thanks in advance,
> Adriano
>
>