Jul 23, 2015, 11:26 AM
[CLOSED] How to send filter, sort, start & Limit parameters of a store in button Directevent
How to send in DirectEvents of button btnExport the store filters, sorts and PagingToolbar's start & limit parameters to controller's action
x.GridPanel()
.ID("gpEntidades")
.Title("Entidades")
.Header(false)
.RowLines(true)
.ColumnLines(true)
.Store(x.Store()
.ID("stEntidades")
.RemoteFilter(true)
.PageSize(50)
.Proxy(x.AjaxProxy()
.Url(Url.Action("GetList", "Entidad"))
.FilterParam("filter")
.SortParam("sort")
.Reader(reader => reader.Add(x.JsonReader().RootProperty("data").TotalProperty("total"))))
.Model(Model))
.TopBar(
x.Toolbar()
.Items(
x.Button()
.ID("btnExport")
.Icon(Icon.PageExcel)
.Text("Listado Completo")
.DirectEvents(d=>
{
d.Click.Url = Url.Action("ExportToExcel", "Entidad", new { start = -1, limit = -1 });
d.Click.IsUpload = true;
d.Click.FormID = "form1";
})))
.BottomBar(
x.PagingToolbar()
.DisplayInfo(true)
.DisplayMsg("Mostrando entidades {0} - {1} de {2}")
.EmptyMsg("No se encontraron entidades"))
Last edited by Daniil; Jul 23, 2015 at 7:07 PM.
Reason: [CLOSED]