2012-03-01 55 views

回答

2

您是否嘗試過在下面的例子中使用.title僞()方法是怎樣的?

Html.Telerik().Grid(Model.SearchResults) 
     .Name("Report") 
     .DataKeys(keys => keys.Add(p => p.RowID)) 
     .DataBinding(d => d.Ajax() 
     .Select("Select", "Report") 
     .OperationMode(GridOperationMode.Client)) 
     .Columns(c => 
     { 
      c.Bound(p => p.RowID).Hidden(); 
      c.Bound(p => p.UserID).Hidden(); 
      c.Bound(p => p.LastName).Title("Last Name"); 
      c.Bound(p => p.FirstName).Title("First Name"); 
      c.Bound(p => p.Address).Title("Address"); 
     }) 
     .Resizable(resizing => resizing.Columns(true)) 
     .Scrollable(c => c.Height("550px")) 
     .Sortable() 
     .Filterable() 
     .Pageable(paging => 
      paging.PageSize(20) 
        .Style(GridPagerStyles.NextPreviousAndNumeric) 
        .Position(GridPagerPosition.Bottom) 
     ) 
     .Footer(true) 
     .Reorderable(reorder => reorder.Columns(true)) 
     .Groupable()