Loading default data in a PropertyPanel with form

Estrusco edited this page Apr 21, 2016 · 1 revision
Clone this wiki locally

From issue: #588

In the case of a PropertyPanel with form data, loading default data in this mode:

    [Panel, FormKey(MyTestForm.FormKey), IdProperty(MyTestFormRow.IdProperty)]
    public class MyTestPanel : PropertyPanel<MyTestFormRow>
    {
        public MyTestPanel (jQueryObject container)
            : base(container)
        {

             var myRequest = new RetrieveRequest();
             myRequest.EntityId = 1;
             MyTestService.Retrieve(myRequest, onSuccess: e => this.propertyGrid.Load(e.Entity));

             [...]