开发者

Insert a button in the grouping header

开发者 https://www.devze.com 2023-01-13 00:31 出处:网络
Any help would 开发者_C百科be appreciable.I want to know how to insert a button in the grouping header without using \"Ext.ux.grid.RowActions\".I am in need of how to put a button in simply by rendere

Any help would 开发者_C百科be appreciable.I want to know how to insert a button in the grouping header without using "Ext.ux.grid.RowActions".I am in need of how to put a button in simply by renderer or something like that..Please help me to figure out this.


Ext JS uses tables in it's markup to display buttons. If you want an Ext JS format button, rather than just a normal button, you could conceivably include the relevant markup in the groupTextTpl attribute of the Ext.grid.GroupingView object associated with the grouped grid, for example:

...
groupTextTpl: 'Item: {gvalue} ({[values.rs.length]} Sub Item{[values.rs.length > 1 ? "s" : ""]}) <table cellspacing="0" class="x-btn  x-btn-text-icon" id="ext-comp-1005" style="width: auto;"><tbody class="x-btn-small x-btn-icon-small-left"><tr><td class="x-btn-tl"><i>&nbsp;</i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i>&nbsp;</i></td></tr><tr><td class="x-btn-ml"><i>&nbsp;</i></td><td class="x-btn-mc"><em unselectable="on" class=""><button type="button" id="ext-gen40" class=" x-btn-text my-action">My Action</button></em></td><td class="x-btn-mr"><i>&nbsp;</i></td></tr><tr><td class="x-btn-bl"><i>&nbsp;</i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i>&nbsp;</i></td></tr></tbody></table>',
...

This will create a button in the grouping header.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号