Hello,
I have a question concerning the AllowAddNew property of the Grid in combination with the AllowEdit Property in the FieldSettings.
When I am setting FieldSettings AllowEdit = "False" the application User can't edit the values of any field which is exactly what I wanted so far. But he also hasn't the chance to determine values for the AddNew Record of the grid.
Is there a simple way to allow the User adding new Records with the help of the grids AddNew Record AND to forbid the Editing of the existing records?
Thanks for the quick answer.
It's working fine!
The AllowEdit property is set per field and not per record. All the cells for the field will be editable or not based on the AllowEdit value. What you can do is cancel the EditModeStarting (e.Cancel=true;) if the record is not an AddNewRecord:
private void xdg_EditModeStarting(object sender, Infragistics.Windows.DataPresenter.Events.EditModeStartingEventArgs e)
{
if (!e.Cell.Record.IsAddRecord)
e.Cancel = true;
}