PDA

View Full Version : [CLOSED] GridPanelFor + HttpProxy



mcfromero
Jan 11, 2013, 11:19 AM
Hi,

I would like to know if is possible reload a gridpanel when using GridPanelFor with data comming from Controller.

Please, look:


public ActionResult Index()
{
List<Person> p = new List<Person>();
p.Add(new Person() { ID = 1, Name = "aaa" });
p.Add(new Person() { ID = 2, Name = "bbb" });
ViewData["Person"] = p;
return View();
}


@(Html.X().GridPanelFor((List<General.Controllers.RelatorioProdutosController.Pe rson>)ViewData["Person"]))


So, when I click in a button and call a controller's method that update ViewData["Person"] what should I do to reload this GridPanel?

Thank you

Daniil
Jan 11, 2013, 2:02 PM
Hi @mcfromero,

Please configure a ServerProxy for the Store.

Example

.Store(s => {
var store = s[0];
store.ServerProxy(...);
})


Calling

store.reload();
client side will initiate a load request via a ServerProxy.