View Full Version : please help:gExt grid and weird hideFocus property

25 Aug 2010, 6:17 AM
I am using a grid component(with several others) and
the following html code was generated through debug:
"<DIV id="procChainGrid">
<DIV class=" x-panel x-grid-panel" id="grid" style="WIDTH: 690px">
<DIV class="x-panel-bwrap" id="ext-gen25">
<DIV class="x-panel-body x-panel-body-noheader" id="ext-gen26" style="WIDTH: 690px; HEIGHT: 130px">
<DIV class="x-grid3" id="ext-gen28" hideFocus style="WIDTH: 688px; HEIGHT: 128px">"

notice the hideFocus property having no value..
the html code is processed through an application which fails because of the hide focus property having no value..
I tried the use Ext.getDom('ext-gen28') to change the hideFocus property but that didnt work...
and browsing through the extjs code didnt help either..
how can I add the true/false property to the hideFocus?

25 Aug 2010, 7:22 AM
Hard-coding the ID isn't good practice. I'd use Ext.getCmp() to get the grid's object, then find the ID of the DOM element you're trying to alter.
From there, you could use Ext.getDom().setAttribute("hideFocus", "true") to change the attribute.

Out of curiosity, what application is failing because of that attribute? It expects boolean value, and most browsers know that if it's default value is false, and the attribute is included without a value, then it defaults to true. It looks valid to me.

25 Aug 2010, 9:14 AM
I'll try to do that,but I dont think that It will work because getting the dom element with ext.getDom - just for testing - seems to do the same thing as what you suggested.. and doing that didnt help..
the application is an internal application for the company I work for which expects a valid dom document.
the document containing the problematic hideFocus causes it to fail.
perhaps there is something else I can do - besides changing the code of the application itself?

25 Aug 2010, 11:39 PM
perhaps someone else can help?