先上效果:

EasyUI 让dialog中的treegrid的列头固定

最主要是在treegrid要加上“fit:true ”如果不加那么就会用diglog的滚动条,导致treegrid的头就没办法固定。

true" >
        <table  
               data-options="
                url: '@Url.Action("GetAllMenusRetTreeGrid", "RestApi")',
                method: 'get',
                rownumbers: true,
                idField: 'id',
                treeField: 'text',
                fitColumns:'true',
                fit:true 
            ">
        <thead>
            <tr> 
                <th data-options="field:'id',hidden:'true'">id</th>
                <th data-options="field:'text'" width="150">@Html.LabelFor(model => model.MenuName)</th>
                <th data-options="field:'link'" width="150" >@Html.LabelFor(model => model.MenuLink)</th>
                 <th data-options="field:'order'" width="70" >@Html.LabelFor(model => model.MenuOrder)</th>
                <th data-options="field:'visible'" width="50">@Html.LabelFor(model => model.IsVisible)</th>
            </tr>
        </thead>
    </table>
    </div>

相关文章:

  • 2022-12-23
  • 2021-10-05
  • 2021-12-24
  • 2022-12-23
  • 2021-07-09
  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
相关资源
相似解决方案