Nov 30, 2012, 8:26 AM
[2.1] GridPanelFor Editor field related to model
Hi,
I built a GridPanel using GridPanelFor successfully.
Now I would add a editor feature to the grid (later I would add a way to save changes).
I added a CellEditing Plugin, but Editor Field for each column is not defined, because columns are generated form model.
I also looked for a way to add them in the model, but i did not found that.
How can i define those fields dinamically, to be generated with the GridPanel from model?
My GridPanelFor code is
I built a GridPanel using GridPanelFor successfully.
Now I would add a editor feature to the grid (later I would add a way to save changes).
I added a CellEditing Plugin, but Editor Field for each column is not defined, because columns are generated form model.
I also looked for a way to add them in the model, but i did not found that.
How can i define those fields dinamically, to be generated with the GridPanel from model?
My GridPanelFor code is
Html.X().GridPanelFor(Model)
.Title("Templs")
.Width(700)
.Height(500)
.Plugins(plugins =>
{
plugins.Add(Html.X().CellEditing()
.ID("CellEditing1")
.ClicksToEdit(1)
);
})
)
Very similar to the example at mvc.ext.net.