View Full Version : Ext.grid refreshes when record is double clicked

24 Dec 2012, 5:22 AM

I would like to know if there's any way to stop the grid being refreshed when we double click any record in it, I am trying to open up the relevant record in a new Ext.TabPanel, the Panel creation code is as below.

title: defTabTitle,
id: TabId,
cls: 'TabDiv',
tabTip: GetHTMLMsg("MGC_PL_LABEL_6756"),
closable: true,
html: '<div id="iframediv' + TabId + '" class="iframe-enclave"><iframe id="mainFrame' + TabId + '" src=' + pageRef + ' class="iframe-tab-div" IFIndex = ' + Index + '></iframe></div><div id="SDEModalCtrl' + TabId + '"></div>',
listeners: {
resize: function()
close: function()
beforeclose: HandleWindowClose

We are loading the tab contents using an iframe, somehow if we use static html instead of dynamic content the grid dosen't refresh.

Is there any other way in which we can achieve this, also would like to know if we can use Ext.Ajax to fetch html from the provided url & load the same inside the iframe.

26 Dec 2012, 8:42 AM
Is the grid within an iframe or something? By default the grid shouldn't refresh.

1 Jan 2013, 9:16 PM
Hi Mitchell,

Yes the grid is within an iframe (which is inside a tab panel), the scenario is that when we double click a record within the grid the record details are shown in a tab panel, to display the record details we create an iframe within which we display our custom UI, this html containing the iframe & custom UI is supplied to the html property of the tab panel; Once the tab panel is loded & we go back to the first panel where the grid is present we notice that the grid gets refreshed.

I would like to know if there is any other way we can acheive this without the grid being refreshed.

7 Jan 2013, 9:58 PM
Hi Mitchell,

Is there any way we can force render the Ext.TabPanel contents before calling the show() method; for test purpose I removed the show() method, when I double clicked the record in the grid a new tab opened up in the background & the grid wasn't refreshed, I've tried using forceLayout, deferredRender & doLayout() also tried display properties as mentioned in http://www.sencha.com/forum/showthread.php?126766-Is-There-Anyway-to-Pre-Layout-Render-Tabpanel-Tabs but the html content gets rendered onto the tab only when we manually click it.

Awaiting your response.