Sep 16, 2013, 3:29 AM
Grid Expander, form data via ajax
Hi.
I have a grid with expander.
I want to bind the form data via ajax / REST.
On expander open -> get the row id -> go to the server /user/1 -> bind the data to the form.
Can you pls share how to do so?
I have a grid with expander.
I want to bind the form data via ajax / REST.
On expander open -> get the row id -> go to the server /user/1 -> bind the data to the form.
Can you pls share how to do so?
Html.X().RowExpander()
.SingleExpand(false)
.Component(
Html.X().FormPanel()
.Items(
Html.X().TextField().Name("company").FieldLabel("
)
.Buttons(
Html.X().Button()
.Text("Save")
.Icon(Icon.Disk)
.Handler(@"
var grid = this.up('grid'), form = this.up('form');
grid.getRowExpander().collapseRow(grid.store.indexOf(form.record));
form.getForm().updateRecord(form.record);
"),
Html.X().Button()
.Text("Cancel")
.Icon(Icon.Decline)
.Handler(@"
var grid = this.up('grid'), form = this.up('form');
grid.getRowExpander().collapseRow(grid.store.indexOf(form.record));
")
)
.Listeners(l =>
{
l.AfterRender.Handler = "this.getForm().loadRecord(this.record);";
})
)
)