I tried the sample on orderManager and try to reproduce hotrow but does't work, ordermanager update row on database or delete it but I want it more simple than that, I want an empty grid and people can add row on the fly and click a button save to save the data on the grid in a database.
but I don't understand how hotrow work it's not pretty clear and not much explanation in the API or example on this.
Class('App', 'xui.Com',{ Instance:{ iniComponents : function(){ // [[Code created by CrossUI RAD Tools var host=this, children=[], append=function(child){children.push(child.get(0));};
return children; // ]]Code created by CrossUI RAD Tools }, // To determine whether to add this row or not _ctl_treegrid2_beforehotrowadded:function (profile, row, leaveGrid){ if(_.get(row,["cells","0","value","length"])){ return true; }else{ return false; } }, _ctl_sbutton7_onclick:function (profile, e, src, value){ var ns = this, data = ns.ctl_treegrid2.getRows("min"); xui.echo(data); } } });
Class('App', 'xui.Com',{ Instance:{ iniComponents : function(){ // [[Code created by CrossUI RAD Tools var host=this, children=[], append=function(child){children.push(child.get(0));};
return children; // ]]Code created by CrossUI RAD Tools }, // To determine whether to add this row or not _ctl_treegrid2_beforehotrowadded:function (profile, row, leaveGrid){ if(_.get(row,["cells","0","value","length"])){ return true; }else{ return false; } }, _ctl_sbutton7_onclick:function (profile, e, src, value){ var ns = this, data = ns.ctl_treegrid2.getRows("min"); xui.echo(data); } } });