CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

How to lock a grid in real execution time!

General discussion

by Lynkin » 29 Apr 2014 18:31

Hello,

I have a "GRID" at one of my apps but it's functionallity needs to be locked after clicking on any data (because it will run a sub-select for another grid), what i want to say is, while the sub-select is not finished, the user can't click on any data from the main GRID again (so the system won't freeze).

Steps:

1. Get data from a database and display it on the grid.
2. Click on any data to run a sub-select for another grid.
3. While the sub-select is running, the user cannot click on another data.
4. After the sub-select is finished, the user is allowed to click again on the grid.

How to lock the grid ? (Example: Enabled and Disabled functionallity).

Methods i've tried:

// Loading message box on screen.
VS_JS := Format('$(".loading").show();',[IWCGJQGrid5.JQHTMLName]);
CGAddJavaScriptToAjaxResponse(VS_JS);

// Add a mask on the grid (deactivated mask)
VS_JS := Format('$("#%s").addClass("ui-state-disabled");',[IWCGJQGrid5.JQHTMLName]); // mask Disabled
// VS_JS := Format('$("#%s").removeClass("ui-state-disabled");',[IWCGJQGrid5.JQHTMLName]); // mask Enabled
CGAddJavaScriptToAjaxResponse(VS_JS);

VS_JS := Format('$("#%s").attr("disabled", "disabled");',[IWCGJQGrid5.JQHTMLName]); // Disable
CGAddJavaScriptToAjaxResponse(VS_JS);

VS_JS := Format('$("#%s").attr("disabled", true);',[IWCGJQGrid5.JQHTMLName]); // Disable
CGAddJavaScriptToAjaxResponse(VS_JS);
Lynkin
 
Posts: 26
Joined: 24 Apr 2014 19:53

by Jorge Sousa » 29 Apr 2014 18:35

Hi

The more natural is if you use LockIndicator for the event where you do the subquery, as described here

http://www.cgdevtools.com/cgforum/viewtopic.php?f=102&t=382
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to General - Archive

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.