Hi, The reason it is not working is because you are using switch case which works with an integer expression not boolean ,due to which always your default case is running. Also,tooltip and imgname both should have values then only it will apply.In your code you are making them blank inside switch cases ,dont do that. I have refactored your code for switch case,try it: function displayIconTooltip(rowData, userLCID) { var str = JSON.parse(rowData); var coldata = str.new_mytruefalse_Value; var imgName = ""; var tooltip = str.new_mytruefalse; coldata=coldata ?1:0; switch (coldata) { case 0: imgName = "new_/images/error.png"; break; case 1: imgName = "new_/images/checked.png"; break; default: imgName = ""; tooltip = "Default"; break; } var resultarray = [imgName, tooltip]; return resultarray; }
↧