Hello,
I have an UltraWebGrid inside an AJAX 2 Web application, with many checkboxes for a time control application.
My problem is that when the users click on those checkboxes , they do not wait for the async postback to terminate, even with an "updating - please wait" warning message I'm showing them.
When that happens, the clicking becomes erratic because some of the checkboxes clicked when the postback was still running are not valid and they dissapear, showing a buggy behaviour.
I was thinking that the way to prevent this is by blocking the UltraWebGrid while the async postback is still running.
Am I right that the only way to do this is by using Client Side Object Model (JavaScript)+existing code behind ?
My idea is that the first thing to do, on the client side is disable the grid, then call the already existing function at the code behind for the "click event" , because all the logic is still in code behind (too complex to change it, better leave it as it is). And when this finishes, enable the grid again.
But, I don't know how to call the already existing code behind function from the client side and where to find a reference for the methods to enable and disable editing the whole grid from the client side.
Any help will be tremendously appreciated 8-D
Thanks in advance,
John
Hello John,
I could not understand what event is causing the postback. However, you could disable the grid on the client-side whenever the async postback occurs using the following line:
igtbl_getGridById("UltraWebGrid1").isDisabled = true;
Please let me know if you need any further assistance with the matter.
I did it in a similar way, thanks:
function UltraWebGrid1_AfterCellUpdateHandler(gridName, cellId){ var myGrid = igtbl_getGridById("UltraWebGrid1"); myGrid.Element.disabled=true;}
It works flawlessly ! But there is one thing that I don't understand (even if it is fantastic for me to do it automatically): After the postback event ("UltraWebGrid1_ActiveCellChange", server side), the grid reenables itself.
It is ok for me, because that's what I want the application to do, but I don't understand why. Do you know if this is a behaviour by default, or is it because my application could have an instruction somewhere doing it ?
Best regards,
John.