-
26 Feb 2012 1:23 PM #61
-
26 Feb 2012 2:08 PM #62
How would you handle custom rendering? I am trying to color code cells based on data returned, but one thing is passed into the renderer: the record.
Any suggestion on the best way to style a cell before rendering?
Code:header : "External", dataIndex: 'ueid', style : "text-align: center;", width : 100, renderer : function(empty_var, rec) { if (rec.m_id == rec.MozMax.ueid) { console.log('This is where I want to color the cell green'); } return rec.MozPage.ueid; }
-
26 Feb 2012 5:00 PM #63
Maybe I am missing your point. I am not sure what you mean by "before rendering". I am using the render method to test the value, and conditionally determine a display value, and a css class , and then I finish render like this:
return '<span class="' + cls + '">' + displayValue + '</span>';
Not sure if that helps you.
-
26 Feb 2012 5:01 PM #64
question for Mitchell, is there a properties way to add styling (cls) to a column header?
Or that will have to be done thru css selectors? I am asking b/c I am thinking of one case where i might want different styling for certain column headers within the same grid.
-
26 Feb 2012 5:11 PM #65
Fixed...
Fixed...
@Mike Lebowski,
You asked:
The answer is "Yes". I am using RC and it is working correctly now.Any idea if this has been fixed in the RC?
-
26 Feb 2012 5:24 PM #66
So simple I didn't see it. I was able to style the text, I will try and make the background a specific color too. Thanks!
What about if I wanted to change the style of a whole row background based on a value of a certain column? Is there a way with this grid plugin to select specific row and style it so it's highlighted? For instance, Say I am looping through records in the store, and if any value in the column "status" == "ok", I want to color the entire row green.
-
28 Feb 2012 11:30 AM #67
I am having this issue too - the first time it is created fine, when I destroy and recreate it throws that error.. It appears this is the offending line:
I'm new to this framework, but from debugging it looks like cfg.grid doesn't have a cls when recreating so I changed that line to:Code:feature = Ext.create(feature, cfg);
The first time it evaluates to true, but when recreating it skips that line. Not sure what the consequenses are, and I doubt its the root cause or the right approach but it works in a pinch. I am just trying to put together a mockup so it is no worries at the moment, but I would like to know why this is failing before creating an application with Sencha Touch.Code:if (cfg.grid.hasOwnProperty('_cls')) { feature = Ext.create(feature, cfg); }
-
5 Mar 2012 3:20 AM #68
Alternate row color
Alternate row color
Hey I am new to sencha, how can I add alternate row color to Ext.ux.touch.grid?
-
5 Mar 2012 5:23 AM #69Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
Use CSS pusedo selector.
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.
-
5 Mar 2012 6:44 AM #70
Not getting exactly how to use CSS pusedo selector in "Ext.ux.touch.grid".



Reply With Quote