ice Posted January 13, 2017 Share Posted January 13, 2017 Hi, i am testing XTemplate in unimDBListGrid and i have problem with get values from store. i think the problem is the fieldname are numbers ? my Code in unievents: function beforeInit(sender, config){ var itemTpl1 = new Ext.XTemplate( '<div>'+ '<t>{0} </t>'+ '<tpl for=".">'+ '<tpl if="this.isA(values)">'+ '<p>A: {1}</p>'+ '<tpl else>'+ '<p>B: {1}</p>'+ '</tpl>'+ '</tpl>'+ '</div>', { isA: function(values){ return values.2 > 250; <- problem } } ); config.itemTpl = itemTpl1;} Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 13, 2017 Share Posted January 13, 2017 Hi, Try like this: return values[2] > 250; Best regards. Quote Link to comment Share on other sites More sharing options...
ice Posted January 13, 2017 Author Share Posted January 13, 2017 Thanks ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.