Styling Asp.net MVC Grid

How can you style Syncfusion grid for Asp.net MVC using CSS? Is there any sample available? I don't want to use built-in themes.

1 Reply

BM Balaji M Syncfusion Team October 15, 2009 08:37 AM UTC

Hi Murad,

Thank you for your interest in Syncfusion products.

We are having customcss support in our Grid. We can achieve this in the following two ways.

1. Using CustomCss Property:

CustomCss allows to Gets or sets CustomCss which is applied for the Grid

Refer the below code snippet, which illustrates this.

public ActionResult Index()
{
GridPropertiesModel model = new GridPropertiesModel
{
DataSource = new StudentDataContext().StudentInfo.Skip(0).Take(20),
AllowSorting=true,
PagingSortingMapper="SortingAction",
Caption = "Student Information",
CustomCss="Syncfusion-Grid-Vista"
};

ViewData["GridModel"] = model;
return View();
}


2. Using set_skin() in Javascript.

set_skin() -allows to set the Skin-Name at the client side.

Refer the below code snippet, which illustrates this.
[Js]


Please refer the sample from below link.
http://files.syncfusion.com/support/grid_mvc/Incidents/I61071/Mvc_SampleGrid.zip

We would also suggest you to refer the below documentation link

http://help.syncfusion.com/ug_73/GridMVC/defaultMVC.html


Please let me know if you have any concerns.

Regards,
M. Balaji.

Loader.
Up arrow icon