Skip to content

Set Default Values Loading default data in a PropertyPanel with form

Victor Tomaili edited this page May 3, 2021 · 1 revision

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));

             [...]
Clone this wiki locally