2013-01-07 98 views
0

我需要一些幫助的語法Telerik的電網detailtview剃刀vb.net語法

我有下面的代碼剃刀。但我沒有看到詳細視圖。當我使用下面的代碼時,細節網格將被渲染,然後是正常的客戶網格。對象是客戶,詳細視圖是這個客戶的一些設置?有人可以幫助我的語法?

謝謝!

@(Html.Telerik.Grid(Model) _ 
      .Name("CustomerGrid") _ 
       .DataBinding(Function(dataBinding) dataBinding.Server() _ 
             .Update("SaveCustomer", "Admin")) _ 
     .DataKeys(Function(keys) keys.Add(Function(o) o.CustomerID)) _ 
     .DetailView(Function(dt) dt.Template(Sub(tt) 
           Html.Telerik.Grid(tt.MessageSettings) _ 
           .Name("MessageSetting" & tt.CustomerID) _ 
           .Columns(Function(dc) { 
               dc.Bound(Function(dd) dd.CustomerMessageSettingsID), _ 
               dc.Bound(Function(dd) dd.Free) 
               }).Render 
         End Sub)) _ 
     .Columns(Function(c) { _ 
         c.Bound(Function(o) o.CompanyName).Width(200), _ 
         c.Bound(Function(o) o.Credits), _ 
         c.Bound(Function(o) o.Address), _ 
         c.Bound(Function(o) o.City), _ 
         c.Command(Function(d) { _ 
          d.Edit.ButtonType(GridButtonType.Image) _ 
         }) _ 
        }) _ 
.Filterable _ 
.Groupable _ 
.Editable(Function(e) e.Mode(GridEditMode.InLine)) _ 
.Pageable() _ 
.Sortable() _ 
) 

回答

0

我建議你使用LoadContentFrom()

.DetailView(details => details.ClientTemplate( 
Html.Telerik().TabStrip() 
.Items(items => 
       { 
items.Add().Text("MyView").LoadContentFrom("PartialActionResult", "Controller", New With { _ 
     .param1 = "<#= ID#>" _ 
    }) 
}) // End of item Tabs 
       .ToHtmlString() 
       ) // End of Detail View Client Template 
       ) // End of Detail View