Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Duplicate fetch in grids with frozen columns in 8.2

    After upgrading from 8.0 to 8.2 all of my data bound grids are submitting duplicate fetch request on creation if at least one column is defined as frozen. The data from the 2nd request are getting appended to the grid so all the results are shown twice.

    Code:
    function showTable(resTypeID, p1){
    	daysW.show();
    }
    
    function tablesReq(dsRequest, resTypeID){
    	var chart = new Object();
    	chart.resTypeID = resTypeID;
    
    	if(resTypeID==4) chart.day_method = 12;
    	return chart;
    }
    
    isc.RestDataSource.create({
        ID : "dayDS",
        dataFormat : "xml",
        recordXPath : "//data/mdays",
        transformRequest : function(dsRequest){
        	return tablesReq(dsRequest, 4);
        },
        fields:[
         {name:"day",primaryKey:true},
         {name:"start"},
     	 {name:"end"},
     	 {name:"isCurr"}
        ],
        dataURL:"serverResponse.jsp"
    });
    isc.ListGrid.create({
        ID: "dayDB",
        dataSource: "dayDS",
        width:"100%", height:525, headerHeight:40, showAllRecords:true,
        autoDraw:false,
        autoFetchData:true,
        fields:[
    	{name:"day", frozen:true, title:"Day", width:50},
    	{name:"start", title:"Start", width:120},
            {name:"end", title:"End", width:120}
        ]
    });
    isc.HLayout.create({
    	ID : "dLayout",
    	members: [
    	 isc.Button.create({title:"DONE", click:"daysW.hide()"})
        ]
    });
    isc.Window.create({
        ID: "daysW",
        title: "Days window",
        autoCenter:true, autoDraw:false, width:"320", height:"585",
        items:[dayDB, dLayout]
    });
    
    Menu.create({
        ID: "dtlMenu",
        autoDraw:false, cellHeight:18, menuButtonWidth:60,
        data:[
    		{title : "Days", click : "showTable(4,'0')"}
        ]
    });
    
    Menubar.create({
        ID: "menuBar",
        top:25,
        menus:[dtlMenu]
    });

    Removing "frozen:true," fixes the problem.

    This is reproducible on all major browsers (FF8, IE7, Chrome 15) with SmartClient eval 8.2.

    thanks,
    - Gene

    #2
    showAllRecords:true is not a good idea with datasets that could be large, but if you're trying to force complete dataset fetch, set dataFetchMode:basic instead.

    Comment

    Working...
    X