Grid Client Side API
Client side api is called by doing $('#gridId').data('api') and an api method
.load({ reset: true })- will bring the grid back to the initial state defined in the markup-
.load({group, sort, params, oparams})- loads the grid with the specified grouping rules, sorting and additional parameters, if a property is omitted than the grid won't change it's state for that property; for example calling.load({group: ['Dish', 'Location']})will change the grouping but won't affect the current sorting rules .clearpersist()- clears the persistence data
GridDemo/ClientSideApi.cshtml
@(Html.Awex().Grid<Lunch>("ApiDemoGrid")
.Main()
.Url(Url.Action("ApiGrid"))
.Height(350)
.Columns(b => {
b.Add(o => o.Id, new Column { Width = 75 });
b.Add(o => o.Person);
b.Add(o => o.Dish.Name);
b.Add(o => o.Price, new Column { Width = 100 });
b.Add(o => o.Date, new Column { Width = 130 });
b.Add(o => o.Location);
}))
Could not find file 'h:\root\home\omuleanu-001\www\demo\Controllers\Awesome\Grid\GridDemoController.cs'.
Events
Comments