Form, loader not showing in event "Load"

Answered
0
0

Hi all,

we have noticed that ShowLoader has no effect inside event “Load”.

That’s a wanted behavior ?

Attached a sample!

 

Thanks

Attachment
  • You must to post comments
Great Answer
0
0

Hi Simone,

My apologies, it’s not a bug actually.

ShowLoader is a property and just setting it doesn’t update the client until the request is completed.

There’s a few issues with the code and what you’re trying to achieve would simply keep showing the loader until you manage to close the dialog. I have attached a modified version of the sample you provided for a demonstration.

In addition this.Refresh() doesn’t do anything in this case since it simply marks the component to be “refreshed” on the client when the request is completed.

I would suggest that you take a look at the AutoShowLoader Property for the buttons. It shows the loader as soon as the button is clicked and removes it when a response arrives from the server.

HTH,
Alaa

Attachment
  • You must to post comments
0
0

Hi Alaa,

thanks for your answer.

 

Your example works, although I still have some doubts.

You said “doesn’t update the client until the request is completed” so is the event “Load” different ? Doing this thing in all others events works nice:


private async void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
// Here working
ShowLoader = true;
await Task.Delay(10000);
ShowLoader = false;
}

Thanks!

 

  • Levie (ITG)
    The Load event fires before the widgets have been rendered on the client, during creation and configuration. The KeyPress event fires after the widgets have already been rendered on the client. Wisej will not show you the loader unless the initial creation and rendering of the Widget has been completed. You can try it in the Appear event and it will work fine.
  • Simone Marconetto
    Hi Levie, perfect thank you!
  • You must to post comments
0
0

Hi Simone,

Thank you for reporting this issue.
We’re currently investigating it and we will notify you with any updates.

Best wishes,
Alaa

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.