Hi,
I have got a UltraWebGrid in my web page, and I have a client side event - "BeforeExitEditModeHandler". I put some validation-related code in the client side function:
function UltraWebGrid1_BeforeExitEditMode(gridName, cellId, newValue) {};
The problem is: if it returns 0, then I am able to set the background color of the cell by doing cell.Element.style.backgroundColor = "#FF0000". However I can not set the background color of the cell if the function returns 1. In other words, the following code does not work:
cell.Element.style.borderColor = "#FF0000";return 0;
Anyone can help me out??
Many thanks
Regards,
Xiaosu
Hello,
If you return true (well, 1 in your case) the exiting of the edit mode is canceled and you still see the editor above the cell. The background color is changed but you can't see it because of the editor. Why do you need to return anything? Simply let it quit.
Hi Alex,
Thank you for your response. Actually, what I want to do is to change the background color if the value in the cell is invalid, and return 0. (Do not exit the editing mode, so that the user can continue to edit.)
I did the validation stuff in the client side function, so I validate the user input before exiting the editing mode. I can not show a different background color because there is a edtior in the cell. So how can I implement this?
Thanks a lot.