I am trying to disable (allowEdit=false or enabled = false) a date control before executeQuery method is called and enable it after the query has finished executing.
This is to avoid having the user to click on the date controls multiple times while the query is still executing.
I have a date range filter on a form that has a grid. The grid will reload based on value selected in the date controls. When the dates are modified, executeQuery on the form datasource is fired from the modified method of the control. I tried
- disabling-enabling the control before and after the executeQuery call in the modified method.
- It didn't work so moved the enabling to active method of the datasource.
- Also tried disabling in validate method and enabling in modified after executeQuery but none of them disables the control to avoid multiples clicks from user.
I removed the control.enabled(true) to make sure that it was being disabled to start with. It seems like a fairly easy thing to do but I am surely missing something. The date controls are not tied to any table fields.
Thanks!