Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Wellyson Bianchini on Oct 17, 2008 10:28
open dhtmlx forum
Remove ZERO value from price edit type

To a price edit field, I am sending blank value... but in grid is show $0. It is not a problem at this time, but when my user will input a new value to this field, ZERO value is not automatically remove causing some problems, because user forget to remove zero.

Does grid has any configuration to not dispay ZERO value and I send a blank? Or remove old value automatically before edit?
Answer posted by Support on Oct 20, 2008 02:29

>>Does grid has any configuration to not dispay ZERO value and I send a blank?

>>Or remove old value automatically before edit?
     http://dhtmlx.com/docs/products/kb/index.shtml?cat=search&page=1&q=5308&ssr=yes&s=price

such logic can be added with the next code
mygrid.attachEvent("onEditCell",function(stage,id,ind){
       if  ( stage == 0 ) mygrid.cells(id,ind).setValue("");
       return true;
})