We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can i get a example of grid?

Thread ID:

Created:

Updated:

Platform:

Replies:

106352 Jan 2,2013 01:51 AM UTC Jan 7,2013 12:11 PM UTC Mobile MVC(Classic) 3
loading
Tags: Grid
rexhxiao
Asked On January 2, 2013 01:51 AM UTC

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

please help me


Thivya [Syncfusion]
Replied On 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.


rexhxiao
Replied On January 5, 2013 08:32 AM UTC

Hi Thivya:

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

thanks a lot


Karthick S P [Syncfusion]
Replied On 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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;