How to disable add new rows in child table in DataGrid....?

Srikanthv

Member
Joined
Jul 3, 2006
Messages
18
Programming Experience
5-10
In DataGrid when it has parentchild link, How to disable add new rows in child table? ( I want datagrid to be editable)

When click on parentchild link it is showing child records, and also user allowed add new records on the table. How can I disable this?

Thanks
srikanth
 
Try this, it worked for me, taken from the Winforms Faq 5.8 (http://www.syncfusion.com/FAQ/WindowsForms/)
VB.NET:
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] cm [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] CurrencyManager = BindingContext(theDataGrid.DataSource, theDataGrid.DataMember)
[/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] dv [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] DataView = cm.List
dv.AllowNew = [/SIZE][SIZE=2][COLOR=#0000ff]False
[/COLOR][/SIZE]

 
Hi,

Code is not working. In my case, ParentTable and Childtable should be editable in datagrid. But Childtable should not allow new rows or add rows in grid. So I need to disable that property for childtable. Please provide me code.

thanks
sri
 
Back
Top