Rene,
And is your grid's datasource set like this:
this.MyGrid.DataSource = dsCustomers1.Tables["Customer"];
If so, that AllowNew setting should work.
My guess is that your DataSource is a different DataView based on the Customer table. If that's the case, then you need to set the AllowNew on that view:
DataView MyView = new DataView(dsCustomers1.Tables["Customer"]);
MyView.AllowNew = false;
this.MyGrid.DataSource = MyView;
~~Bonnie
>Hi Kevin,
>
>I have tried using the following code:
>dsCustomers1.Tables["Customer"].DefaultView.AllowNew = false;
>
>But still it allows to add data using arrow down key.
>
>
>Rene
>
>>Hi, Rene,
>>
>>For the datatable bound to the grid, you'll need to do the following:
>>
>>
MyTable.DefaultView.AllowNew = false
>>
>>Let me know if that helps
>>Kevin