Can i get a example of grid?

I can't see any example (code) about grid

please help me


3 Replies

TH Thivya Syncfusion Team January 2, 2013 09:09 AM UTC

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.

Regards,
Thivya.



RE rexhxiao January 5, 2013 08:32 AM UTC

Hi Thivya:

I want to know how to use 「.ActionMode(MobActionMode.Json)」?

thanks a lot



KS Karthick S P Syncfusion Team January 7, 2013 12:11 PM UTC

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


Loader.
Up arrow icon