-
15 Dec 2012 10:28 PM #1
Grid columns with no explicit renderer definition are not shown
Grid columns with no explicit renderer definition are not shown
I tried ExtJS 4.2.0 with my project, which works fine in ExtJS 4.1.3.
I saw that in a grid where I have several columns and one of them (not the first one) does not have renderer specified explicitly, the columns from this one and on are blank.
Looking at the code it seems the problem is in function renderCell:
which should beCode:if (column.renderer.call) {
Code:if (column.renderer && column.renderer.call) {Yaron Yogev
IT Software Developer
-
16 Dec 2012 4:50 AM #2
Does the examples/grid/array-grid.html example work in your SDK?
Because that has a column with no renderer. The "Company" column is just an unprocessed string.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
16 Dec 2012 4:55 AM #3
There is always a renderer property. It inherits false from the base class's prototype for exactly this purpose, so that an if(renderer.blah) test can be done.
Must be something else in your code. Can you post a cut down example?Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
16 Dec 2012 5:15 AM #4
Hello Nigel,
Yes, I believe it has to do with my code, but it does work in 4.1.3.
My code takes a dynamic definition of column from a DB table, where some of the columns have renderer defined by name. It goes over the saved definitions for the columns used and sets renderer to the function with the given name (using eval), or otherwise sets it to undefined. I believe the problem is that the SDK does apply rather than applyIf of the values in the column config.
Thanks,Yaron Yogev
IT Software Developer
-
16 Dec 2012 5:20 AM #5
Fixed
Fixed
Once I changed the code to avoid setting renderer to undefined the problem was fixed.
However, I think the SDK should not behave in this manner: if you have a default value set for an attribute it should not be overridden by undefined.Yaron Yogev
IT Software Developer
-
16 Dec 2012 7:24 AM #6
OK, you're explicitly setting it to undefined. We'll have to add the truthiness test as you suggested.
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
16 Dec 2012 7:24 AM #7
Thanks for the report! I have opened a bug in our bug tracker.
We'll explicitly test for presence of renderer
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-8043
in
4.2.0 Sprint 2.


Reply With Quote