MVC.Grid Column Styling

  • Quick start
  • Installation
  • Ajax grid
  • Grid filtering
  • Grid filter modes
  • Grid multi filtering
  • Grid global search
  • Grid sorting
  • Grid paging
  • Grid manual processing
  • Grid styling
  • Grid html attributes
  • Grid row attributes
  • Grid row processing
  • Grid no data found text
  • Grid footer
  • Grid id
  • Grid localization
  • Grid data page export
  • Multiple grids
  • DataTable source
  • Grid custom partial
  • Switching normal grid to ajax grid
  • Column header title
  • Column value rendering
  • Column value formatting
  • Column html encoding
  • Column filter options
  • Column value filtering
  • Column multi value filtering
  • Column default filter method
  • Column value sorting
  • Column initial sort order
  • Column first sort order
  • Column styling
  • Column custom filter
  • Pager page sizes
  • Pager initial page
  • Pager rows per page
  • Pager pages to display
  • Reloading grid with post data
  • Binding row clicked event
  • Binding reload events
  • Reloading ajax grid
  • Filter registration
  • Filter unregistration
  • Grid javascript API
Styling columns
Id Name Surname Marital status Bolded age Birthday Employed
1 Joe Crosswave Married 37 1/5/1988 False
2 Merry Lisel Widowed 47 5/6/1978
3 Henry Crux Single 35 11/19/1990 True
4 Cody Jurut 55 8/11/1970 False
5 Simon Scranton Single 40 10/10/1985
6 Leena Laurent Divorced 25 7/1/2000 False
7 Ode Cosmides Married 59 4/17/1966 True
8 Diandra Mizner Single 26 8/20/1999 False
9 Pete Cassel Married 28 3/13/1997 False
10 Nicky Tremblay Married 37 1/5/1988 True
View @model IQueryable<Person> @(Html .Grid(Model) .Build(columns => { columns.Add(model => model.Id).Css("collapse"); columns.Add(model => model.Name).Titled("Name"); columns.Add(model => model.Surname).Titled("Surname"); columns.Add(model => model.MaritalStatus).Titled("Marital status"); columns.Add(model => model.Age).Titled("Bolded age").Css("bolded"); columns.Add(model => model.Birthday).Titled("Birthday").Formatted("{0:d}"); columns.Add(model => model.IsWorking).Titled("Employed"); }) ) Css <style> .collapse { display: none; } .bolded { font-weight: bold; } </style>

Từ khóa » Html.grid Mvc Column Width