Hi,
After you've bound the grid to the data source, do the following:
CurrencyManager cm = this.BindingContext[theGrid.DataSource,
theGrid.DataMember].List as CurrencyManager;
DataView view = (DataView)cm.List;
view.AllowNew = false;
--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx\
Fox said:
How can I avoid datagrid to add a new record.
Only allow datagrid to edit old record.
Thank,