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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Not able to apply skin on Grid

Thread ID:





100952 Sep 15,2011 07:44 AM UTC Sep 20,2011 11:19 AM UTC ASP.NET MVC (Classic) 1
Tags: Grid
Sonam Mehta
Asked On September 15, 2011 07:44 AM UTC


I am using razor engine. I have define stylesheet and theme on my master page (_layout.cshtml).
@{ Html.Syncfusion().StyleManager()
.Register(stylesheets =>

But when I run my application with syncfusion grid, Grid does not show with theme.

My grid code is as follow in my cshtm page register with master page:

@{ Html.Syncfusion().Grid("Grid1")
.Caption("User List")
.Column(column =>
column.Add(p => p.gebruiker_id).HeaderText("User ID");
column.Add(p => p.naam).HeaderText("Name");
column.Add(p => p.email).HeaderText("Email ID");
column.Add(P => P.avatar).HeaderText("Avtar");
.EnableSorting().SortSettings(sorting => sorting.AllowMultiSorting(true).AllowSorting(true))
.EnablePaging().PageSettings(p => p.PageSize(10).PageCount(3).PagerStyle(PagerStyle.DefaultAndAdvanced).ShowPagerInformation(true).PagerPosition(Position.BottomLeft).AllowPaging(true))

Can you please provide me some solutions?

Ranjithkumar R G [Syncfusion]
Replied On September 20, 2011 11:19 AM UTC

Hi Sonam,

Thanks for using Syncfusion products.

Your requirement of applying skin to grid can be achieved by setting the property AutoFormat() in cshtml page. Please refer to the code-snippet below.


@{ Html.Syncfusion().Grid("Grid1")
.Column(column =>
column.Add(p => p.OrderID).HeaderText("Order ID");
column.Add(p => p.EmployeeID).HeaderText("Employee ID");
column.Add(p => p.CustomerID).AllowEditing(false);
column.Add(p => p.ShipCountry).HeaderText("Ship Country");
column.Add(p => p.OrderDate).HeaderText("Order Date").Format("{0:MM/dd/yyyy}");
column.Add(p => p.Freight).HeaderText("Freight");





Please refer to the below link to download the sample application.


Please let me know if you have any concern.



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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