Categories | Question details Back To List | ||||||||
price types Currency Symbol from $ to €( EURO) How do I change the price types Currency Symbol from $ to € (EURO) without modifying the api code? Answer posted by Support on Apr 03, 2008 05:53 >>without modifying the api code? This line hardcoded so it much more easy to change a single character in original code, but can be done by script as well eXcell_price.prototype.setValue = function(val){ if(isNaN(Number(val))){ val = 0; var color = "green"; if(val<0) color = "red"; this.setCValue("<span>ˆ</span><span style='padding-right:2px;color:"+color+";'>"+val+"</span>",val); } Answer posted by john on Apr 03, 2008 07:38 I prefer to work in my jsp code, so on next upgrade I will have no problems... This is my code, how I could put the code in here? mygrid.setColTypes( "ro,ro,ro,ro,ro,ro,ro,ro,price,price,ro,ro,ro"); mygrid.init(); mygrid.loadXML(loadDataURL); Answer posted by Support on Apr 03, 2008 09:32 You can place code anywhere before data loading, in case of above code - anywhere before calling mygrid.loadXML(... Answer posted on Apr 08, 2008 08:07 I've tries the following code but it does not work, probably i'm missing something......... mygrid.setColTypes( "ro,ro,ro,ro,ro,ro,ro,ro,price,price,ro,ro,ro"); mygrid.setValue = function(val){ if(isNaN(Number(val))){ val = 0; var color = "green"; if (val<0) color = "red"; this.setCValue("<span>e</span><span style='padding-right:2px;color:"+color+";'>"+val+"</span>",val); } } mygrid.init(); mygrid.loadXML(loadDataURL); Answer posted by Support on Apr 08, 2008 09:09 The correct code is a eXcell_price.prototype.setValue = not the mygrid.setValue = eXcell_price is a global object, which defines rules for price excell. Answer posted on Apr 09, 2008 02:55 Without the code you give me, I see $ and numbers , whit the code it appears blank, no sign no numbers... what I'm wrong? mygrid.setColTypes( "ro,ro,ro,ro,ro,ro,ro,ro,ro,price,price,ro,ro"); mygrid.setInitWidths("0,50,75,70,50,150,150,150,150,60,60,150,60"); mygrid.setColAlign( "center,center,center,center,center,center,center,center,center,center,center,center,center"); mygrid.setColumnColor("#ffffff,#ffffff,#ffffff,#ffffff,#ffffff,#ffffff,#ffffff,#ffffff,#ffffff,#ffffff,#ffffff,#ffffff,#ffffff"); mygrid.setSkin("modern"); mygrid.enableMultiselect(true); mygrid.setOnRowDblClickedHandler(doOnRowDblClicked); eXcell_price.prototype.setValue = function(val){ if(isNaN(Number(val))){ val = 0; var color = "green"; if(val<0) color = "red"; this.setCValue("<span>$</span><span style='padding-right:2px;color:"+color+";'>"+val+"</span>",val); } }; mygrid.init(); mygrid.enableAlterCss("even","uneven"); mygrid.setSkin("modern"); mygrid.setPagingWTMode(true,true,true,false,["Risultati","Records da "," a ","Pag. "," Righe per pag."]); mygrid.enablePagingWT(true,12,0,"recinfoArea"); mygrid.loadXML(loadDataURL); Answer posted by Support on Apr 09, 2008 06:24 Please check attached sample. Attachments (1)
|