开发者

ExtJs - GroupingView style

开发者 https://www.devze.com 2023-04-10 11:46 出处:网络
Need to make tpl for Grouping Grid. Now I\'m doing a property groupTextTpl. Code in it: groupTextTpl : \'{[values.rs[0].data[\"name\"]]} ({[values.rs.length]} {[values.rs.length > 1 ? \"Items\" :

Need to make tpl for Grouping Grid. Now I'm doing a property groupTextTpl. Code in it:

groupTextTpl : '{[values.rs[0].data["name"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
开发者_运维技巧

But I want to display next to the name drop-down lists - references and to move the inscription "1 items" to the right like this How to implement it?


I'm not 100% sure if this is possible, but try wrapping the "# items" part in a HTML <span> tag, give it a class name and then create CSS code to align it to the right side. I.e:

groupTextTpl : '{[values.rs[0].data["name"]]} <span class="quantity">({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})</span>'

Then in the CSS you can do something like this:

.quantity { float: right; }

Hope this helps.

0

精彩评论

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

关注公众号