I added the design-time databinding to the project. Maybe you can have a look at it to see weather or not this could be added to the Neo project. In order to get it working I had to support the IEditableObject interface for the EntityObject. See code below:
#region Implementation of IEditableObject
public bool IsNew = false;
public int InEdit = 0;
void IEditableObject.EndEdit()
{
//Exit if we're not editing
if (InEdit==0)
return;
InEdit-=1;
//Exit if nothig has changed
if (InEdit>0) return;
//Update the data; set possible IsNew bool
Row.EndEdit();
IsNew = false;
}
void IEditableObject.CancelEdit()
{
//Delete the Row if it was new
InEdit=0;
if (IsNew)
Row.Delete();
else
Row.CancelEdit();
}
void IEditableObject.BeginEdit()
{
//Maintain the InEdit couter; otherwise the IsNew bool is set too soon
InEdit+=1;
Row.BeginEdit();
}
#endregion
– Jan Brandsma
Labels:
