If you are working with ComboBox Item in SmartClient, you might be required to perform some action ( setting a flag, or modifying the selected data ) when a picker selection is made. Though this task can be easily done by using the example code provided by Isomorphic when you are working with static data , it gets trickier when the field names you are going to work with are only available at runtime. The documentation and examples are not very obvious about how to do this. Well, the key to this lies in the fact that the ComboBox Item in SmartClient JavaScript framework is actually a ListGrid. You can do whatever you can you with a ListGrid by accessing it through the "pickListProperties" attribute of the combo box. Since, we want to handle ComboBox picker selection event, we can do it by implemeting the 'rowClick' event inside 'PickListProperties' attribute.
Here is the code
Here is the code
{
name: "symbol",
editorType: "comboBox",
pickListProperties: {
rowClick: function(record, recordNum, fieldNum){
doSomethingWith(record[fieldName]);
return true;
}
},
}
No comments:
Post a Comment