-
13 Feb 2011 8:18 PM #131
-
13 Feb 2011 9:25 PM #132
-
13 Feb 2011 9:27 PM #133
-
13 Feb 2011 10:36 PM #134
-
14 Feb 2011 12:10 AM #135
I made a small workaround by extending the Ext.DataView. I added the following lines of code after line 135 (version 2.0b1):
Seems to work quite okay!Code:prepareData:function(recordData, ri, record) { for (var i = 0; i < colModel.length; i++) { var col = colModel[i]; if(typeof col.renderer == 'function') { recordData[col.mapping] = col.renderer.apply(this, [recordData[col.mapping]]); } } return recordData; }
-
14 Feb 2011 12:38 AM #136
-
14 Feb 2011 6:11 PM #137
This seems to work better! 8)
Code:prepareData:function(recordData, ri, record) { if(recordData.rendered) return recordData; for (var i = 0; i < colModel.length; i++) { var col = colModel[i]; if(typeof col.renderer == 'function') { recordData[col.mapping] = col.renderer.apply(this, [recordData[col.mapping]]); } } recordData.rendered = true; return recordData; }
-
14 Feb 2011 6:47 PM #138
Is there a way to "scrollTo" to a specific table row?
-
18 Feb 2011 6:28 AM #139Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,641
- Vote Rating
- 434
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
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 services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
20 Feb 2011 6:20 PM #140
Hi Mitch!
The renderer function seems to break when you apply sorting on the columns. Each time the user clicks on the columns to perform a sort, the cell is rendered.
For example, my price column becomes $$$$1 after sorting a few times.
The same seems to happen on your demo, but it's not so visible. After sorting a few times, the "Change" column values get some additional code:
<span style="color: #FF0000;"><span style="color: #FF0000;"> ... </span></span>
Cheers!



Reply With Quote