I think this problem has something to do with a way the SC renders the screen.
Here is a scenario.
Title:
"ListGrid placed on one of tabs in a TabSet"
Data for the control:
DataSource:
Problem only occurs for the ListGrid without data.
Description of a problem:
When I load data into the control for a first time everything is fine. But if I run again I am getting this:
Another detail. It will work fine as long as a tab that the ListGrid is on is selected. Another words, if I allow a focus to get onto ListGrid it works fine.
It also works if I am not doing ListGrid.startEditingNew(); after data is loaded.
Hope, it is clear and can give you a clue of what's going on.
Thanks
Here is a scenario.
Title:
"ListGrid placed on one of tabs in a TabSet"
Code:
this.lstPersonalInjuries = isc.ListGridComboBoxEdit.create({ dataSource: "PersonalInjuries", width: 440, height:180, listEndEditAction:"next", canEdit:true, editEvent: "click", showHeader: true, fields:[ {name: "list_id", title: "List", type: "text", length: 50, width:220 }, {name: "numberinjured", title: "Number Injured", type: "integer", length: 2, width:95 }, {name: "numberfatal", title: "Number Fatal", type: "integer", length: 2, width:95 }, {name:"remove", showTitle: false, type:"header", width: 20, defaultValue: "", formatCellValue :"isc.Canvas.imgHTML('../../../common/images/scdelete.jpg', 16, 16)" } ] });
Code:
isc.ResultSet.create ({ ID: resultSetName, dataSource : dataSourceObject, initialData : DSRecords }); ListGrid.setData(eval(resultSetName)); if (ListGrid.data.getLength() == 0) ListGrid.startEditingNew(); } }
Code:
isc.DataSource.create({ ID:"PersonalInjuries", dataFormat:"xml", dataURL:"url", dataProtocol:"postParams", recordXPath:"//personalinjuries", fields:[ {name:"id", primaryKey:true, hidden:true, type:"sequence"}, {name:"file_id", primaryKey:true}, {name:"list_id"}, {name:"numberinjured"}, {name:"numberfatal"} ] });
Description of a problem:
When I load data into the control for a first time everything is fine. But if I run again I am getting this:
Code:
08:32:36.501:XRP8:WARN:Log:Error: ''this.body' is null or not an object' in http://localhost/beltrailway/mainapplication/forms/main.htm at line 711 ListGrid.$33w(_1=>1195137081306, _2=>"programmatic", _3=>undef) ListGrid.cancelEditing(_1=>undef) ListGrid.discardEdits(_1=>0, _2=>undef) ListGrid.discardAllEdits(_1=>undef, _2=>undef) ListGrid.setData(_1=>[ResultSet ID:RSPersonalInjuries]) populateComboDSUseParameters(xmlDoc=>[XMLDoc <VFPData>], xmlText=>"<?xml version = "1.0" encoding="Windows-..."[7318], DSArray=>Array[21], objectTypeArray=>Array[21], objectNameArray=>Array[21], valueFieldArray=>Array[21], displayFieldArray=>undef, gridFieldArray=>undef) $37b(xmlDoc=>[XMLDoc <VFPData>], xmlText=>"<?xml version = "1.0" encoding="Windows-..."[7318], Obj, Obj) Class.fireCallback(_1=>$37b(), _2=>"xmlDoc,xmlText,rpcResponse,rpcRequest", _3=>Array[4], _4=>undef, _5=>undef) on [Class XMLTools] XMLTools.$37c(_1=>Obj, _2=>"<?xml version = "1.0" encoding="Windows-..."[7318], _3=>Obj) ** recursed on Class.fireCallback
It also works if I am not doing ListGrid.startEditingNew(); after data is loaded.
Hope, it is clear and can give you a clue of what's going on.
Thanks