views:

130

answers:

1

I have a Silverlight User Control. This contains a DataForm. This DataForm nests another Silverlight User Control, which also contains a DataForm.

I have bound the nested dataform successfully to an object in the parent control.

I can NOT however, get the nested control to enter Edit mode along with the parent. I have tried calling it directly by using the FindNameInContent method to return the nested dataform and then called BeginEdit() but this fails (returns false).

Stuck.

A: 

I had a simpler scenario but a similar problem. In my scenario I had a DataGrid directly nested inside a DataForm, and was unable to synchronize the edit modes of the two controls until I realised that I needed to implement an EditTemplate for the DataForm, as well as the ReadOnlyTemplate, and implement the DataGrid in both. I set IsReadOnly=true for the DataGrid in the ReadOnlyTemplate and IsReadOnly=false for the DataGrid in the EditTemplate, and it all works smoothly, with no code.

Dave.

bigme