Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1179
Drawing control over ultragrid
posted

With a control inheriting from an ultragrid I'd like to place another control on the design surface and have it draw itself over the ultragrid. When I try this though, the control isn't visible. Checking its properties I can see that it is visible, has a sensible, non-zero size, and a location that should be visible. I've also tried calling its BringToFront method. Is there any way I can do this?

We're trying to add functionality to all our grids (which use a class inheriting from the ultragrid) to be able to display an indicator that data is being fetched, along with a cancel button to abort the fetch. I've created a usercontrol to implement this, but am getting the behaviour described. I've tried using a simple standard control as well, but that isn't displayed either

Parents
No Data
Reply
  • 23930
    Offline posted

    Hi Kevin,

    Thank you for posting to our forums.

    One reason for why you can’t see your control is if you are fetching the data on the UI thread. That will lead to the UI thread being blocked until it is done with the fetching the data, so your controls can’t be drawn. What you could do is to fetch the data on another thread, and display your controls on the main thread. There are a few ways to implement this. I have attached a sample demonstrating how to do this with the Task class. It displays an activity indicator over the control while a long loading of data is simulated.

    Please let me know if you have any additional questions.

    WG_DisplayProgressIndicator.zip
Children