3
我目前正在尋找koGrid來呈現動態數據網格,我需要一些定製。KoGrid:訪問網格
例如,我想在不使用默認列菜單的情況下顯示和隱藏列。
這是菜單欄的HTML輸出:
<div data-bind="visible: showColumnMenu">
<span class="kgMenuText">Choose Columns:</span>
<ul class="kgColList" data-bind="foreach: nonAggColumns">
<li class="kgColListItem">...</li>
</ul>
</div>
正如你所看到的,在foreach結合利用了nonAggColumns
財產。如果你看看koGrid庫,這個屬性在window.kg.Grid
上定義。我希望能夠從koGrid的上下文之外訪問此屬性(以及kg.Grid的其他屬性)。
有沒有人有想法如何實現這一目標?任何幫助非常感謝!
謝謝,這看起來像一個很好的解決方案!我會測試它,然後會接受。 – thomaux