Jul 18, 2012, 2:30 PM
[CLOSED] [RAZOR] Change the store on a GridPanel
Hi
I have a store defined on a GridPanel. Once the user clicks Search I have to change the store's content to the new query.
I have the following razor code, a backing controller and a method to make a remote call and return the results as a StoreResult.
I've followed the link
http://forums.ext.net/showthread.php...ews-controller
But I'm not sure how to get a handle to the store to call .LoadData(...)
I have a store defined on a GridPanel. Once the user clicks Search I have to change the store's content to the new query.
I have the following razor code, a backing controller and a method to make a remote call and return the results as a StoreResult.
I've followed the link
http://forums.ext.net/showthread.php...ews-controller
But I'm not sure how to get a handle to the store to call .LoadData(...)
.Add(Html.X().Panel()
.ID("Summary")
.Title("Summary")
.Split(true)
.Layout(Ext.Net.LayoutType.Accordion)
.Add(Html.X().Panel()
.ID("Panel1")
.Title("Summary")
.Add(Html.X().GridPanel()
.ID("SummaryGridPanel")
.AutoScroll(true)
.ColumnModel(columns =>
{
columns.Add(Html.X().Column()
.Text("Column1")
.DataIndex("_Column1")
);
columns.Add(Html.X().Column()
.Text("Column2")
.DataIndex("_Column1")
);
})
.Store(store => store.Add(Html.X().Store()
.ID("SummaryStore")
.Buffered(false)
.AutoLoad(false)
.Proxy(proxy => proxy.Add(Html.X().AjaxProxy()
.Url("/Query/GetData")
.Reader(reader => reader.Add(Html.X().JsonReader()
.Root("data")
))
))
.Model(model => model.Add(Html.X().Model().Fields(fields =>
{
fields.Add(Html.X().ModelField().Name("_Column1"));
})
))
))
)
)
...
Last edited by Daniil; Jul 27, 2012 at 2:04 PM.
Reason: [CLOSED]