Hi
How can I bind the whole Container.DataItem to my Control in the FormTemplate? I have a UserControl for editing my object (in this case Person) and would like to reuse this in the EditFormSettings of the RadGrid but can't achieve this in a TwoWay mode.
My code so far:
| <EditFormSettings> |
| <FormTemplate> |
| <uc:GridButtons ID="GridButtons2" runat="server" Position="Top" /> |
| <data:PersonPanel runat="server" ID="PersonPanel" DataSource='<%# Container.DataItem %>' |
| AddCss="panel" GroupingText="Personendaten" /> |
| <uc:GridButtons ID="GridButtons1" runat="server" Position="Bottom" /> |
| </FormTemplate> |
| </EditFormSettings> |
GridButtons is just a UserControl with the Edit/Canel buttons (top and bottom) whereas PersonPanel is my control which takes a Person object and gives a Person object back (DataSource Property). The Propblem is that the Container.DataItem expression is only OneWay, how could I achieve this in both ways so the RadGrid gets the updated Object back?
Thanks for help!