Go Back   SmartClient Forums > Technical Q&A
Wiki Register Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 6th Jul 2009, 06:51
markwagoner markwagoner is offline
Registered Developer
 
Join Date: Dec 2008
Posts: 77
Default ListGird on Inactive Tab

I have found a problem in RC2 when a list grid is on an inactive tab.

If autoFetchData is false and I try to call fetchData on the grid before it has been rendered (by selecting that tab) I get the error "_5 is undefined at http://localhost:8084/isomorphic/system/development/ISC_Grids.js line 912". If I simply change my code to place grid on the first tab (so it is rendered when the page is loaded) it does not get this error. Likewise, if autoFetchData is true the exact same code does not get an error.

It may have something to do with the datasource because when I tried to create a test case with the data in-line the problem also went away.
Reply With Quote
  #2  
Old 6th Jul 2009, 07:45
markwagoner markwagoner is offline
Registered Developer
 
Join Date: Dec 2008
Posts: 77
Default More Details

I think I narrowed it down to the sortFieldNum property. For some reason if I don't specify this the error goes away.

It still does not seem to cause a problem if the data is in-line, so here is my grid and data source declaration:

Code:
    availableValuesGrid: isc.ListGrid.create({
        showEdges: true,
        alternateRecordStyles: true,
        showHeader: false,
        leaveScrollbarGap: false,
        showAllRecords: true,
        emptyMessage: "",
//        sortFieldNum: 0,
        autoFetchData: false,
        fields: [
            {name: "title", type: "text"}
        ],
        dataSource: isc.DataSource.create({
            dataFormat: "json",
            clientOnly: true,
            dataURL: "inquiry/valuelist",
            fields: [
                {name: "title", type: "text"},
                {name: "name", type: "text", primaryKey: true},
                {name: "um", type: "text"}
            ]
        })
    }),
As soon as I uncomment the sortFieldNum property it will get an error when I invoke the fetchData method (unless the tab has been rendered).
Reply With Quote
  #3  
Old 6th Jul 2009, 16:45
Isomorphic Isomorphic is online now
Administrator
 
Join Date: May 2006
Posts: 30,535
Default

Hi Mark
Thanks for the update
This issue has been resolved since the 7.0RC release - the fix will be part of 7.0 final.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search


© 2010,2011 Isomorphic Software. All Rights Reserved