PDA

View Full Version : [FIXED] "overHeader.isOnLeftEdge is not a function" after calling grid.reconfigure()



azuroff
27 Apr 2011, 1:35 PM
I have a dynamic grid that I configure using the reconfigure() function. After the grid is re-rendered, I see this error in the console every time I mouse over the grid headers -


overHeader.isOnLeftEdge is not a function (in ext-all-debug.js line 78964)

I don't see the problem when I mouse over the original grid headers.

azuroff
3 May 2011, 8:05 AM
Bump?

As we plan to use dynamic grids quite extensively in our application, this is a big problem for us...

bodyboarder20
7 Jun 2011, 4:27 AM
I'm suffering from the same problem....

dontbugme
8 Jun 2011, 3:41 PM
I'm having this problem too. I had to manually register the new columns with Ext.ComponentManager in order for this to work. Reconfiguring with new columns does not register them and a call to Ext.getCmp is failing, which is the root cause.

azuroff
8 Jun 2011, 3:44 PM
I made some change to my grid a while back and the problem went away, but now I don't remember exactly what I changed. :">

If you post your grid definition code, it might ring a bell...

dongryphon
8 Jun 2011, 10:59 PM
Please post a simple example that recreates the problem. That is the only way we can be sure we are looking at the right thing.

dontbugme
9 Jun 2011, 7:23 AM
Here is what is causing my errors:



var c = Ext.clone(this.columns);
this.reconfigure(this.store, c);


I'm not sure whether clone should be registering the columns object or if reconfigure should be doing it, but doing this in the initComponent of a grid will cause javascript errors to be thrown when mousing over column headers. The workaround I am using is to manually register each column with the ComponentManager immediately after calling this.reconfigure.

dongryphon
10 Jun 2011, 1:44 AM
Thanks for the extra info! Many times a bug presents itself at one place in the code, but the fix is elsewhere. Off-hand I don't see what is wrong with the snippet you posted, but if you could post a small example program that produces the problem that will be essential in helping us isolate the root cause and a proper fix.

A good example would be http://www.sencha.com/forum/showthread.php?132409

Thanks again!

bodyboarder20
10 Jun 2011, 4:26 AM
I found the reason why I was getting the error...

I have a grid that I am manually creating the Ext.grid.header.Container for... and within it's config, I was adding "resizable:true" to the defaults (ie. to each column header). Once I removed that - then I was no longer able to resize my columns! So I manually added in enableColumnResize: true to my header containers config, and live was happy.



....
columns: Ext.create('Ext.grid.header.Container', {
enableColumnResize: true, // <---- GOOD (and seems to be required when manually creating the header container)!
defaults: {
sortable: true,
hideable: true,
groupable: true,
hidden: true/*,
resizable: true <----- BADD!!! */
},
defaultType: 'gridcolumn',
items: [{
header: 'Name',
dataIndex: 'name',
flex: 1,
hidden: false
},
....


If you are curious why I wanted to manually create my header container - its because I have a TON of columns in a particular grid (actually only 10) and I wanted to set default config values on each column...

Not sure if what I found explains why the other folks are getting the error...

odiln
21 Sep 2011, 6:08 AM
I had the same issue. Got it fixed by removing resizable: true from the columns config (since it defaults to true).

azuroff
21 Sep 2011, 7:18 AM
I had the same issue. Got it fixed by removing resizable: true from the columns config (since it defaults to true).

That fixes it for me as well, but for some reason our users like to have resizable columns - so that isn't a viable long-term solution.

odiln
21 Sep 2011, 7:31 AM
That fixes it for me as well, but for some reason our users like to have resizable columns - so that isn't a viable long-term solution.

But after removing this config option columns still remain resizable, since this "resizable" config option defaults to true. Or am I missing something?

azuroff
21 Sep 2011, 8:29 AM
But after removing this config option columns still remain resizable, since this "resizable" config option defaults to true. Or am I missing something?

I thought I had tried that when troubleshooting this problem earlier, but apparently not, because removing it from the column config does indeed work as I need it to.

odiln
21 Sep 2011, 8:49 AM
IMHO this issue is caused by confusion between "resizable" config of the Ext.grid.column.Column and its ancestor in second grade: Ext.container.Container.

This is what API docs say about resizable config for Ext.container.Container:

Specify as true to apply a Resizer (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.resizer.Resizer) to this Component after rendering.

And it seems that when we explicitly say for the column {resizable: true}, it gets part of behavior of resizable Container (you can notice blue draggable borders appearing on the column header when you mouse over it and subject exception is thrown).
Dear Ext Dev team - could you confirm that issue is indeed there?

makana
26 Oct 2011, 5:45 AM
Problem is still available.

Ext.grid.column.Column needs an empty initResizable method:


Ext.grid.column.Column.override({
initResizable: Ext.emptyFn
});


It works for me.

cheers,
makana

EESW
18 Apr 2012, 6:47 AM
"Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build. "

How do I find out what build this is fixed in? I'm running 4.0.7 and I'm running into this bug.

EESW
23 Apr 2012, 12:46 PM
Bump.

Can anyone confirm that this was fixed and in what version?

Rahul_Tokase
18 Jul 2013, 10:56 PM
Hi

In my column configs i have specefied the id's to the columns after removing the id's from the columns this error is got resolved.


Thanks
Rahul Tokase