Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
506
BeforeExitEditMode problem
posted

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

Parents
  • 14049
    Suggested Answer
    Offline posted

    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.

Reply Children