Hi Rexhxiao,
Thanks for your interest in Orubase Product.
Please find the following code snippet for Grid.
@Html.Orubase().Grid<Standings>("grid")
.Datasource(Model).Caption("Foot Ball Team
Standings ")
.ActionMode(MobActionMode.Server)
.Column(col =>
{
col.Add(c => c.Team).HeaderText("Team");
col.Add(c => c.Won).HeaderText("W");
col.Add(c => c.Loss).HeaderText("L");
col.Add(c => c.Percent).HeaderText("PCT");
col.Add(c => c.L10).HeaderText("L10");
})
You can also check our following online UG link for further reference.
http://help.syncfusion.com/UG/orubase/default.htm#!Documents/grid.htm
Please let us know if you have any further queries.Hi Thivya:
I want to know how to use 「.ActionMode(MobActionMode.Json)」?
thanks a lot
Hi Rexhxiao,
Please find the following code snippet to render the Grid in JSON mode.
View:
@Html.Orubase().Grid<Standings>("grid")
.Datasource(Model).Caption("Foot Ball Team
Standings ")
.ActionMode(MobActionMode.JSON)
.Column(col =>
{
col.Add(c => c.Team).HeaderText("Team");
col.Add(c => c.Won).HeaderText("W");
col.Add(c => c.Loss).HeaderText("L");
col.Add(c => c.Percent).HeaderText("PCT");
col.Add(c => c.L10).HeaderText("L10");
})
In order to work with paging and sorting actions, create a Post method for the respective action and bind the data source to the grid as shown in the following code.
Controller:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(MobGridParams args)
{
var data = StandingsDetails.GetData(); // datasource
return data.MobGridJSONActions<Standings>(); // for Server Mode it will be -> data.MobGridActions<Standings>();
}
Please let us know if you have any
queries.
Regards
Karthick S P