Hi
can you re oder records in treegrid with multiple columns ? i have a code which I cant re oder records in it. canReorderRecords is set to true .
can you re oder records in treegrid with multiple columns ? i have a code which I cant re oder records in it. canReorderRecords is set to true .
Code:
isc.VStack.create({ ID:"SwitchListChooserVStack2", top:10, membersMargin:10, width:"25%", loadResult :function(data1){ SwitchListDetailsTree.data.openAll(); }, height:"30%", showSwitchLists :function(){ getConfigurationSettings(); SwitchListChooserList.fetchData(null,"SwitchListChooserVStack2.processResult(data)"); }, processResult :function(data){ clearAndSetAllSwitchListValues(data) ; SwitchListChooserEditForm.getField('lastUpdated').setValue(document.getElementById('lastModified').value); SwitchListChooserEditForm.getField('lastUpdated').setDisabled(true); }, members: [ isc.Button.create({ margin:20, title:"Update now", autoDraw:false, top:30, click:"SwitchListChooserVStack2.showSwitchLists()", width:200, ID:"SwitchListChooserUpdate", height:100 }), isc.Button.create({ title:"View", margin:20, autoDraw:false, width:200, ID:"SwitchListChooserView", click:" detailTabs.selectTab(1); SwitchListDetailsTree.fetchData(null,\"SwitchListChooserVStack2.loadResult(data)\");", height:100 }) ] }) ] }); // instantiate DataSource on the client only (this example explicitly bypasses // ISC server-side DataSource management) DataSource.create({ ID:"RailCarDetails", transformRequest : function (dsRequest) { var params = { railRoadId :document.getElementById('railRoad').value, switchListId : selectedSwitchId }; return params; }, fields: [ {name: "categoryName", type:"text", primaryKey: true, title: "Item", length: 128}, {name: "station", type:"text", title: "station", length: 128}, {name: "parentID", type:"text", hidden: true, foreignKey: "RailCarDetails.categoryName", rootValue:"root"}, {name: "equipmentInitial", type:"text", title:"Equipment Initial", type:"text", length:500}, {name: "equipmentNumber", type:"text", title:"Equipment Number", type:"text", length:500}, {name: "carTypeCd", type:"text", title:"Car Type Code", type:"text", length:500}, {name: "outsideLength", type:"text", title:"Outside Length", type:"text", length:500}, {name: "outsideWidth", type:"text", title:"Outside Width", type:"text", length:500}, {name: "outsideHeight", type:"text", title:"Outside Height", type:"text", length:500}, {name: "tareWeight", type:"text", title:"Tare Weight", type:"text", length:500}, {name: "weight", type:"text", title:"Weight", type:"text", length:500}, {name: "trackSeqId", type:"text", title:"Track Sequence", type:"text", length:500}, {name: "equipStatusCd", type:"text", title:"Equipment Status", type:"text", length:500}, {name: "isHazmat", type:"text", title:"is Hazmat", type:"text", length:500}, {name: "destOnline", type:"text", title:"Destination Online", type:"text", length:500}, {name: "comments", type:"text", title:"Comments", type:"text", length:500}, {name: "receivedDTM", type:"text", title:"Recieved Date", type:"text", length:500}, {name: "fromToRoad", type:"text", title:"From To Road", type:"text", length:500}, {name: "lastMoveDTM", type:"text", title:"Last Move Date", type:"text", length:500}, {name: "equipmentMoveType", type:"text", title:"Equipment Move Type", type:"text", length:500}, {name: "lastStorageMove", type:"text", title:"Last Storage Move", type:"text", length:500}, {name: "lastPlacementMove", type:"text", title:"Last Placement Move", type:"text", length:500}, {name: "lastStatusMove", type:"text", title:"Last Status Move", type:"text", length:500}, {name: "lastStatusMoveDTM", type:"text", title:"Last Status Move Date", type:"text", length:500}, {name: "lastPlacementStatusSame", type:"text", title:"Last Placement Satus Same", type:"text", length:500}, {name: "badOrderReasonCd", type:"text", title:"Bad Order Reason", type:"text", length:500}, {name: "trackLocation", type:"text", title:"Track Location", type:"text", length:500}, {name: "blockId", type:"text", title:"Block Id", type:"text", length:500}, {name: "isSelectedIcon", type:"boolean", defaultValue:false ,title:"Selected"}, {name: "descIcon", type:"text", title:"Description Icon", type:"text", length:500}, {name: "railCarIcon", type:"text", title:"Railcar Icon", type:"text", length:500}, {name:"moveTypes", width:300, title:"Move Type" , type: "comboBox"}, {name:"moveDate", title:"Move Date", type: "Date"}, {name:"moveTime", title:"Move Time", type: "Time"}, {name:"moveStations",title:"Stations" , type: "comboBox"}, {name:"moveLocations",title:"Locations" , type: "comboBox"}, {name:"patrons",title:"Patrons" , type: "comboBox"}, {name:"barOrderCodes",title:"Bad order code", type: "comboBox"}, {name:"Comments",title:"Move Comments", type: "text", length:500} ] }) var updateType = "none"; isc.TreeGrid.create({ ID:"SwitchListDetailsTree", dataSource:"RailCarDetails", // sortFieldNum: 3, // headerHeight: 30, // sortDirection: "ascending", canReorderRecords: true, canAcceptDroppedRecords: true, recordClick:"this.updateDetails()", updateDetails : function () { var record = this.getSelectedRecord(); if (SwitchListDetailsItemDetailTabs.getSelectedTabNumber() == 0) { SwitchListDetailsItemViewer.setData(record) } }, fields: [ {name: "categoryName" ,width:430}, {name:"descIcon", title:"Description Icon", width:80, align:"center",wrap:true,canEdit:false, formatCellValue : function (value, record, field, rowNum, colNum) { if (value !="noicon" ) return isc.Canvas.imgHTML("demoApp/checked.png",13,13); //else return isc.Canvas.imgHTML("demoApp/unchecked.png",13,13) }}, {name:"railCarIcon", title:"Railcar Icon", width:80, align:"center",wrap:true,canEdit:false, formatCellValue : function (value, record, field, rowNum, colNum) { if (value !="noicon" ) return isc.Canvas.imgHTML("demoApp/checked.png",13,13); //else return isc.Canvas.imgHTML("demoApp/unchecked.png",13,13) }}, {name:"trackSeqId",wrap:true,width:32}, // {name:"equipmentInitial", title:"Railcar Initail", canEdit:false}, // {name:"equipmentNumber", title:"Railcar Number", showHover:true,canEdit:false}, {name:"destOnline", title:"Detsination", showHover:true,canEdit:false,width:190}, {name:"equipmentMoveType", title:"Equipment Move Type", showHover:true,canEdit:false} ], folderDrop : function(nodes, folder, index, sourceWidget) { } });
Comment