5 Aug 2012 7:30 AM #1
Answered: Can I specify childNode length in the NestedLIst getItemTextTpl tpl?
I would like to display the number of child nodes.
Is there any way to do this in tpl using the getItemTextTpl? (Other than having the data source create a "count" field, that is.)
One would think there was some way to access the current record's TreeNode...
If you return the number of children in a field and have that field in your model you should be able to use that in the template string that is returned in getItemTextTpl
7 Aug 2012 5:41 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
If you return the number of children in a field and have that field in your model you should be able to use that in the template string that is returned in getItemTextTplMitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
7 Aug 2012 7:46 AM #3
Is this different from having a "count" field that the data source based on the number of children?