Dec 17, 2012, 3:37 PM
Last edited by Pyropace; Dec 17, 2012 at 3:49 PM.
public ActionResult Index()
{
return View(<a DataTable instance>);
}
Html.X().GridPanelFor(Model.Table)
.Title("Data")
.ID("DataGrid")
.Flex(2)
.Disable(true)
.ForceFit(true)
.View(v => v.Add(new GridView()))
.Store(Html.X().Store().AutoLoad(false)
.Model(Html.X().Model().IDProperty("DataGridStore"))
.Proxy(Html.X().AjaxProxy()
.Url(Url.Action("GetTable"))
.Reader(Html.X().JsonReader().Root("data")))
.Parameters(ps => ps.Add(new StoreParameter("tableName", "App.comboBoxMethods.getValue()", ParameterMode.Raw)))))))
Ext.create("Ext.grid.Panel", {
id: "GridPanel1",
renderTo: App.gridContainer.getBody(),
autoHeight: true,
ForceFit: true,
store: {
model: Ext.define("DataModel", {
extend: "Ext.data.Model",
fields: tableFields
}),
autoLoad: true,
proxy: {
data: tableValues,
type: 'memory',
reader: {
type: "array"
}
}
},
columns: {
items: columns
}
});
Html.X().GridPanel()
Also reconfiguring is possible.