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. Image for the cookie policy date
close icon

Does Syncfusion versrion 8 MVC grid support MVC3 and Razor view engine?

I am using syncfusion 8.303.0.21 in my MVC3 Visual Studio 2010 project.

The sample code from syncfusion 8.303.0.21 are coded for MVC 1 and MVC2, it is not targetting MVC3 and not using razor engine views.

I am copying the sample code and try to convert it to MVC3 Razor view, everything appears right, but the grid is not showing in my page(and no grid HTML markup created ). No error encounterd also.

Does Syncfusion MVC grid support MVC3 and Razor view engine?

Here are highlight of my codes:
1. in _Layout.cshtml file:
added following line at end of body section.
@{Html.RegisterStaticResources();}

2. in index action
public ActionResult Index(Skins? Skins)
{
IList inboxList = GetWFInBoxList();
GridPropertiesModel grdModel = new GridPropertiesModel()
{
DataSource = inboxList,
//AllowGrouping = true,
AllowSorting = true,
//Caption = "Orders",
AllowPaging = true,
AllowScrolling = false,
Height = 225,
AllowFiltering = true,
CustomCss = "Syncfusion-Grid-Greenish"
};
ViewData["DefaultSkin"] = Skins == null ? Syncfusion.Mvc.Shared.Skins.Blend : (Skins)Skins;
ViewData["GridModel"] = grdModel;

return View(grdModel);
}

2. in the view

@{Html.Grid("itemlist", "GridModel",
column =>{
column.Add(p => p.Selected).HeaderText("Select");
column.Add(p => p.QueueDate).HeaderText("Queue Date");
column.Add(p => p.AssignedDeskName).HeaderText("Assigned Desk");
column.Add(p => p.CounterPartyName).HeaderText("Counter Party");
column.Add(p => p.CtrTypeDesc).HeaderText("Contract Type");
column.Add(p => p.ServiceTypeDesc).HeaderText("Service Type");
});
}




1 Reply

RR Ranjithkumar R G Syncfusion Team January 23, 2012 11:35 AM UTC

Hi Greg,

Thanks for using Syncfusion products.

We would like to inform you that Syncfusion Grid supports both MVC3 and Razor from the version 9.1 as the both got included from the framework 4.0 . We suggest you to please upgrade to the latest version to utilize the MVC3 and Razor view support in Grid.

Please let us know if you have any concern.

Regards,
Ranjithkumar.


Loader.
Live Chat Icon For mobile
Up arrow icon