2016-12-22 3 views
0

詳細テンプレートを含む剣道グリッドを、すべての詳細行を開いた位置に表示したいとします。サーバ剣道グリッドディテールテンプレートをどのように開いた位置に表示させますか?

私はサーバーバインディングを使用していますので、有用であるかもしれない詳細テンプレートのイベントの多くは発生しません。

私はHtmlTableAttributesを使用しようとしましたが、これもうまくいかないようです。

IE F12分析では、表示状態がnoneに設定されたディテールテンプレートテーブルがグリッドに表示され、開いているアイコンを押すと表示状態が解除されます。

詳細テンプレートをすべて開かれた状態にしたいクライアントがあります。

これは私の剣道のコードです:サーバー側バインディングを使用した場合

  @(Html.Kendo().Grid(Model) 
       .Name("PriorityListingGrid1") 
      .Columns(columns => 
      { 
       columns.Bound(e => e.name).Title("Immunotherapy Open Studies").HeaderHtmlAttributes(new { style = "font-size:x-large;font-weight:bold;text-align:center;" }) 
        .HtmlAttributes(new { style = "font-size:larger;font-weight:bold;text-align:left;" }) 
        .Width("100%"); 
      }) 
      .Events(e => { e.DetailInit("detailInit"); }) 
          .DetailTemplate(e => myDetailDetailViewTemplate1(this,e.siteSlotData, e.id)) 
                         .HtmlAttributes(new { style = "min-height:600px;" }) 
             .DataSource(dataSource => dataSource 
               .Server() 
               .Model(model => model.Id(p => p.id)) 
               .PageSize(Model.Count()) 
                ) 
     ) 
     @helper myDetailDetailViewTemplate1(WebViewPage page, IEnumerable<AdminApplicationsLibrary.Immunology.SiteSlotData> f, int id, int ignored = 0) 
      { 
       String grid_ref = String.Format("details_{0}", id); 
       this.Page.tgrid_ref = grid_ref; 
       @(Html.Kendo().Grid(f) 
        .Name(grid_ref) 
        .HtmlAttributes(new { style = "width:104.3%;Left:-41px;" }) 
        .TableHtmlAttributes(new { style = "font-size:8pt;" }) 
        .Columns(columns => 
         { 
          columns.Bound(o => o.RxStudy.irb).Template(@<text> 
                     @Html.ActionLink(@item.RxStudy.irb.ToString(), "Details", "ImmunoRxStudy", new { id = @item.RxStudy.id }, null) 
                     </text>).HeaderHtmlAttributes(new { style = "font-weight:bold;" }).Width("10%"); 
          columns.Bound(o => o.priority).HeaderHtmlAttributes(new { style = "font-weight:bold;" }).Width("5%"); 
          columns.Bound(o => o.RxStudy.short_name).HeaderHtmlAttributes(new { style = "font-weight:bold;" }).Width("19%"); 
          columns.Bound(o => o.Status).HeaderHtmlAttributes(new { style = "font-weight:bold;" }).Title("Status").Width("5%"); 
          columns.Bound(o => o.slots).HeaderHtmlAttributes(new { style = "font-weight:bold;" }).Width("8%"); 
          columns.Bound(o => o.notes).HeaderHtmlAttributes(new { style = "font-weight:bold;" }).Width("20%"); 
          columns.Bound(o => o.pre_tx).HeaderHtmlAttributes(new { style = "font-weight:bold;" }).Width("5%"); 
          columns.Bound(o => o.archival).HeaderHtmlAttributes(new { style = "font-weight:bold;" }).Width("5%"); 
          columns.Bound(o => o.on_tx).HeaderHtmlAttributes(new { style = "font-weight:bold;" }).Width("5%"); 
          columns.Bound(o => o.RxStudy.phase).HeaderHtmlAttributes(new { style = "font-weight:bold;" }).Width("10%"); 
          columns.Bound(o => o.RxStudy.open_date).HeaderHtmlAttributes(new { style = "font-weight:bold;" }).Width("8%"); 
          columns.Bound(o => o.RxStudy.rn_cra).HeaderHtmlAttributes(new { style = "font-weight:bold;" }).Width("10%"); 
         }) 
        .DataSource(dataSource => dataSource.Server().Model(model => model.Id(p => p.id))) 
       ) 
      } 

はどのようにして、詳細テンプレートのすべてのために選択された位置にある詳細テンプレートの表示を作るのですか?

他の選択肢がない限り、私は本当にこの時点でAjaxバインディングを使用したくありません。

誰もがこれを手伝ってくれますか?

答えて

0

多くの検索の後、私が探していた答えを発見しました。この特定の結果を可能

  @(Html.Kendo().Grid(Model) 
       .Name("PriorityListingGrid1") 
      .Columns(columns => 
      { 
       columns.Bound(e => e.name).Title("Immunotherapy Open Studies").HeaderHtmlAttributes(new { style = "font-size:x-large;font-weight:bold;text-align:center;" }) 
        .HtmlAttributes(new { style = "font-size:larger;font-weight:bold;text-align:left;" }) 
        .Width("100%"); 
      }) 
      .DetailTemplate(e => myDetailDetailViewTemplate1(this,e.siteSlotData, e.id)) 
                     .HtmlAttributes(new { style = "min-height:600px;" }) 
         .DataSource(dataSource => dataSource 
           .Server() 
           .Model(model => model.Id(p => p.id)) 
           .PageSize(Model.Count()) 
             ) 
      .RowAction(r => { r.DetailRow.Expanded = true; }) 
     ) 

RowAction方法:

メイングリッドに変更する必要があります。私はTelerikのドキュメンテーションや例のどこにいても見つけられなかったことに気づくでしょう。私はgoogleとstackoverflowでこれを使うことへの言及を見つけました。

:-)

関連する問題