2012-03-10 72 views
1

我有以下代碼。如何設置header/row/alt。排式那裏?如何設置header/alt。行/行樣式爲MvcContrib網格?

@Html.Grid(Model.PagedList).Columns(       
         col => 
         { 
          col.For(c => c.Name).Named("Name"); 
          col.For(c => c.City).Named("City"); 
          col.For(c => c.StateName).Named("State"); 
          col.For(c => c.StartDateString).Named("Start Date"); 
          col.For(c => c.EndDateString).Named("End Date"); 
         } ).Sort(Model.GridSortOptions).Attributes(@class => "grid") 

回答

2

希望這將幫助你

table.grid { 
     /*table style */ 
    } 


    tr.gridrow { 
     /*row style */ 
    } 

    .grid tr th 
    { 
     /*header style */ 
    } 

    .gridrow td { 
     /*table data style in a row */ 
    } 

    .gridrow_alternate td { 
     /*table data style in an alternate row */ 
    } 

    tr.gridrow_alternate { 
     /* alternate row style */ 
    }