Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

setEditValue cannot not trigger the formatCellValue of other fields

$
0
0
Hi,

I have a grid and there are one database field 'CAS_NO' and two non database fields 'EINECS_DESC'. 'EINECS_NO'


When I use the setEditValue to change the value in teh field 'CAS_NO' but it would not trigger the change of value in the fields 'EINECS_DESC'. 'EINECS_NO'

Please help

A part of the program code is reproduce below


<DataSource
schema="VTTPC"
dbName="OracleDev"
tableName="rea_vendor_sub"
ID="rea_vendor_sub"
dataSourceVersion="1"
generatedBy="v9.1p_2014-07-18/EVAL Deployment 2014-07-18"
serverType="sql"
>
<fields>
<field sqlType="decimal" sqlLength="10" name="RVS_ID" type="sequence" primaryKey="true" required="false" ></field>
<field sqlType="decimal" sqlLength="10" name="RVI_ID" type="integer" required="true" foreignKey="rea_vendor_ITEM.RVI_ID" ></field>
<field sqlType="varchar" sqlLength="100" name="CAS_NO" length="100" type="text" required="true" ></field>
<field sqlType="decimal" sqlLength="12" name="S_WEIGHT" type="float" required="true" ></field>
<field sqlType="decimal" sqlLength="12" name="S_WEIGHT_PCT" type="float"></field>
<field sqlType="varchar" sqlLength="4000" name="REMARKS" length="4000" type="text"></field>
</fields>
</DataSource>





var rea_vendor_sub_Grid = isc.ListGrid.create({
ID: "rea_vendor_sub_List",
height: 150,
cellheight: 22,
dataSource: rea_vendor_sub,
showGridSummary:true,
cellDoubleClick: "editCASNo(this, record, rowNum, colNum);",
fields:[
{name:"RVS_ID", title:"RVS_ID", canEdit: false, showGridSummary:false },
{name:"RVI_ID", title:"RVI_ID", canEdit: false, showGridSummary:false},
{name:"EINECS_DESC", title:"Chemical Substance", showGridSummary:false, canEdit: false
formatCellValue: function (value, record) {
return record.CAS_NO+ "– add something";
}
},
{name:"CAS_NO", title:"CAS No.", showGridSummary:false, canEdit: false},
{name:"EINECS_NO", title:"EINECS No.", showGridSummary:false, canEdit: false
formatCellValue: function (value, record) {
return record.CAS_NO+ "– add something";
}
},
{name:"S_WEIGHT", title:"Substance Weight(g)"},
{name:"S_WEIGHT_PCT", title:"Substance Weight(%)", canEdit: false},
{name:"REMARKS", title:"Remarks", showGridSummary:false}
] ,
canEdit: true,
modalEditing: true,
editEvent: "click",
listEndEditAction: "next",
canRemoveRecords:true,
autoSaveEdits: false
});


.
.
.
.

function editCASNo (thisCaller , record, rowNum, colNum){
if (!(thisCaller.getField(colNum).name == 'CAS_NO')) {
return;
}
rea_vendor_sub_List.setEditValue(rowNum, colNum, "abc");
}

Viewing all articles
Browse latest Browse all 4756

Trending Articles