I have a Ext.grid.GroupingView an i group my data with a “field1” but it also can be nul i would like to know if there is a way to change the ‘text’ on the GroupTextTpl in order to display
Data without Group
When my field1 is null, i tried this
( {gvalue==null?"Null":text} ) ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})
But didn’t work, any ideas on this?
The group view uses an XTemplate in that groupTextTpl config, so you should check out the documentation for XTemplates, it’s very detailed and very powerful. Basically, any code that is within square brackets is evaluated, which is what you need in your example. Also, not sure why you have parenthesis around things…unless thats part of your output.
Try this:
Inside square brackets you can access the current data values using the values keyword.