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");
});
}