|
linb
|
 |
« Reply #2 on: March 12, 2011, 04:33:33 AM » |
|
You can use "getNumberedStr" function to custom the number format:
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.Pane) .setHost(host,"ctl_pane6") .setLeft(80) .setTop(30) .setWidth(610) .setHeight(330) ); host.ctl_pane6.append( (new linb.UI.TreeGrid) .setHost(host,"ctl_treegrid2") .setRowNumbered(true) .setHeader([{"id":"col1", "width":80, "type":"label", "caption":"col1"}, {"id":"col2", "width":80, "type":"label", "caption":"col2"}, {"id":"col3", "width":80, "type":"label", "caption":"col3"}, {"id":"col4", "width":80, "type":"label", "caption":"col4"}]) .setRows([{"cells":[{"value":"row1 col1", "id":"c_a", "oValue":"row1 col1"}, {"value":"row1 col2", "id":"c_b", "oValue":"row1 col2"}, {"value":"row1 col3", "id":"c_c", "oValue":"row1 col3"}, {"value":"row1 col4", "id":"c_d", "oValue":"row1 col4"}], "id":"a"}, {"cells":[{"value":"row2 col1", "id":"c_e", "oValue":"row2 col1"}, {"value":"row2 col2", "id":"c_f", "oValue":"row2 col2"}, {"value":"row2 col3", "id":"c_g", "oValue":"row2 col3"}, {"value":"row2 col4", "id":"c_h", "oValue":"row2 col4"}], "id":"b"}, {"cells":[{"value":"row3 col1", "id":"c_i", "oValue":"row3 col1"}, {"value":"row3 col2", "id":"c_j", "oValue":"row3 col2"}, {"value":"row3 col3", "id":"c_k", "oValue":"row3 col3"}, {"value":"row3 col4", "id":"c_l", "oValue":"row3 col4"}], "sub":[["sub1", "sub2", "sub3", "sub4"]], "id":"c"}]) .setCustomFunction({ getNumberedStr:function(numb){ return numb+"-"; } }) ); return children; // ]]code created by jsLinb UI Builder } } });
|