Categories | Question details Back To List | ||
Check result before grid cell editing Hello, I'd like to check the result of an Ajax call before giving the possibility to edit a cell. In the onEditCell event of my grid, I write the following : if (stage==0) { var result = myAjaxCall(); if (result == 1) { return false; } } But the fact that the call is asynchronous makes that "result" is undefined and so the code is not reached. Do you have any solution to this problem ? Thanks Answer posted by dhxSupport on Jul 10, 2009 03:22 >>But the fact that the call is asynchronous makes that "result" is undefined and so the code is not reached. To solve this you should make synchronous call. Answer posted by dhxSupport on Jul 10, 2009 03:29 BTW using such validation can decrease grid perfomance. If you need to deside if user can edit cell or not better to change type of the grid's cell or disable cell's editor after autorization. |