Categories | Question details Back To List | ||
can I set default values for attributes if i dont set them explicitly Hi, I have some row and cell attributes. Sometimes some of them are not populated with values are these are optional. But when i dont set value for these atrtibutes "undefined" comess in serialized xml. Is there any way to avoid this like setting some default value for attributes or not including attributes when they dont have values. But not including attribute should happen at runtime as sometimes i need all of the attributes and sometimes i dont. Please help Answer posted by Stanislav (support) on Jan 14, 2010 03:00 You can add the code like next, to provide default value for attributes. grid.attachEvent("onRowCreated",function(id){ if (row.getRowAttribute(id,"some") == window.undefined ) rowSetRowAttribute(id,"some","default value"); return true; }) |