May 14, 2009, 1:12 PM
CheckColumn value convert from Boolean to String
Hello,
I have an editable <ext:Gridpanel> for the user to enter phone types. They need to indicate if a type is valid or not.
The column "PHONE_TYPE_ACTV_IND" uses a Convert to translate from Char(1) to true/false when loading the data.
Now, when the data is inserted/updated, I need to send it has a Char(1) instead of true/false.
Any help will be appreciated.
<script language="javascript" type="text/javascript">
function convert(v) {
if (v == "Y") {
return true;
}
if (v == "N") {
return false;
}
}
</script>
....
<ext:RecordField Name="PHONE_TYPE_ACTV_IND" Type="Boolean">
<Convert Fn="convert" />
</ext:RecordField>
.......
<ext:CheckColumn ColumnID="PHONE_TYPE_ACTV_IND" Width="60" Editable="true" DataIndex="PHONE_TYPE_ACTV_IND" Header="Active?" Align="Center"/>