2017-01-30 6 views
0

別の剣道グリッド行の中の剣道グリッドを「詳細」テンプレートとして入れ子にしています。私はこの非常にイライラした問題を抱えています。剣道は自分で定義していても、詳細グリッドの列を自動的に生成しているようですが、表示したくない列がたくさん表示されています。ここで剣道を停止させてグリッド列を表示させない

は、元のグリッドです:

$("#ResellerBillingGrid").kendoGrid({ 
    dataSource: viewModel.resellerDataSource, 
    editable: false, 
    groupable: false, 
    sortable: true, 
    pageable: true, 
    scrollable: false, 
    filterable: { 
     extra: false, 
     messages: { 
      isTrue: "Yes", 
      isFalse: "No", 
      info: " " 
     } 
    }, 
    filterMenuInit: filterMenuInit, 
    detailTemplate: kendo.template($("#resellerDetailTemplate").html()), 
    detailInit: viewModel.detailInit, 
    columns: [ 
     { field: "DisplayName", title: "Reseller" } 
    ] 
}); 

そしてここでは、グリッドの詳細と一緒に私のviewmodelです:

var viewModel = new kendo.observable({ 
    resellerDataSource: new kendo.data.DataSource({ 
     transport: { 
      read: { 
       url: "/Host/Billing/GetResellers", 
       dataType: "json", 
       type: "GET" 
      } 
     }, 
     pageSize: 20, 
     schema: { 
      model: { 
       fields: { 
        DisplayName: { type: "string" }, 
        ResellerOrganizationsDataSource: [ 
         { 
          Id: { type: "number" }, 
          OrgDisplay: { type: "string" }, 
          UserCount: { type: "number" }, 
          PricingTier: { 
           Id: { type: "number" }, 
           Name: { type: "string" }, 
           PricePerUser: { type: "number" }, 
           Total: { type: "number" } 
          } 
         } 
        ] 
       } 
      } 
     }), 
     detailInit: function (e) { 
      var detailRow = e.detailRow; 

      detailRow.find(".resellerOrgsGrid").kendoGrid({ 
       dataSource: { 
        data: e.data.ResellerOrganizationsDataSource, 
        pageSize: 10, 
        schema: { 
         model: { 
          fields: { 
           Id: { type: "number" }, 
           OrgDisplay: { type: "string" }, 
           UserCount: { type: "number" }, 
           PricingTier: { 
            Id: { type: "number" }, 
            Name: { type: "string" }, 
            PricePerUser: { type: "number" }, 
            Total: { type: "number" }  
           } 
          } 
         } 
        } 
       }, 
       scrollable: false, 
       sortable: true, 
       pageable: true, 
       columns: [ 
        { field: "OrgDisplay", filterable: { ui: orgFilter }, title: "Name" }, 
        { field: "PricingTier.Name, title: "Pricing Tier", filterable: { ui: tierFilter }), 
        { field: "PricingTier.PricePerUser", title: "Price Per User", format: "{0:C2}" }, 
        { field: "UserCount", title: "Total Users" }, 
        { field: "PricingTier.Total", title: "Total", format: "{0:C2}" } 
       ] 
      } 
     }); 
    } 
}); 

今狂気の部分は、私はから列定義を削除する場合でも、ということですdetailグリッドの場合、「自動生成された」列はすべてそのまま残ります。ここで

は私が取得しています何のスクリーンショットです - わずか5が定義されている場合でも、行についての詳細のすべての列が表示されているかがわかります

enter image description here

誰もこれに実行されましたこれを引き起こしている可能性のあるものについて前に問題があるか、何か考えがありますか?

答えて

0

私はそれを理解しました。問題は、グリッドのカラムとその他のプロパティをの内側ではなくDataSourceの内側に定義していたことです。すべては現在正常に動作しています。

関連する問題