You can use onBeginEdit event:
Class('App', 'linb.Com',{
Instance:{
iniComponents : function(){
// [[code created by jsLinb UI Builder
var host=this, children=[], append=function(child){children.push(child.get(0))};
append(
(new linb.UI.Block)
.setHost(host,"ctl_block2")
.setLeft(110)
.setTop(30)
.setWidth(480)
.setHeight(140)
.setBorderType("inset")
);
host.ctl_block2.append(
(new linb.UI.TreeGrid)
.setHost(host,"ctl_treegrid2")
.setRowNumbered(true)
.setEditable(true)
.setHeader([{"id":"col1", "width":80, "type":"label", "caption":"col1"}, {"id":"col2", "width":180, "type":"listbox", "editorListItems":["a1", "b1", "c1"], "caption":"col2"}])
.onBeginEdit("_ctl_treegrid2_onbeginedit") append( (new linb.UI.SButton) .setHost(host,"ctl_sbutton25") .setLeft(120) .setTop(230) .setCaption("Add special") .onClick("_ctl_sbutton25_onclick")
);
return children;
// ]]code created by jsLinb UI Builder
},
_ctl_sbutton5_onclick : function (profile,e,src,value){
var ns = this;
ns.ctl_treegrid2.insertRows(["list-1",{editorListItems:["a","b","c"]}]);
},
_ctl_sbutton6_onclick : function (profile,e,src,value){
var ns = this;
ns.ctl_treegrid2.insertRows(["list-2",{editorListItems:["1","2","3"]}]);
},
_ctl_sbutton31_onclick : function (profile,e,src,value){
var ns = this;
ns.ctl_treegrid2.insertRows(["col default list"]);
},
_ctl_sbutton44_onclick : function (profile,e,src,value){
var ns = this;
ns.ctl_treegrid2.insertRows(["date picker",{type:"date"}]);
}, _ctl_sbutton25_onclick : function (profile,e,src,value){ var ns = this; ns.ctl_treegrid2.insertRows(["custom",{special:true}]); }, _ctl_treegrid2_onbeginedit : function (profile,cell,editor){ editor.setItems(["Loading..."]); _.asyRun(function(){ editor.setItems(["from","backend"]); },1500); } }});