I wrote functionality in a java script that locks the screen and unlocks the screen. A block screen means that it locks the screen, so the user cannot click anything (a loader icon appears on the screen).
There are two UIBlocker methods.
1. UIBlocker.blockScreen()
2. UIBlocker.unblockScreen()
Now I need to lock the screen when loading JQGrid. I want to ask where should I use UIBlocker.blockScreen () and UIBlocker.unblockScreen () .?
According to my findings, UIBlocker.blockScreen should be used in the beforeRequest event , since it is fired before requesting data. But there are other events that fire before loading, for example beforeProcessing, loadBeforeSend . Therefore, I am still embarrassed.
Secondly, where should I use unblockScreen . In loadComplete or in gridComplete ?
Here I found the execution order of jqgrid,
beforeRequest
loadBeforeSend
serializeGridData
loadError (if a error from the request occur - the event from steps 5 till 7 do not execute. If there is no error the event 4. does not execute and we continue to with the step 5.)
beforeProcessing
gridComplete
loadComplete
Now suggest me where should I use BlockScreen and unblockScreen ?
source
share