Best way to create tool window with DB loaded grid

Docking/MDI for Windows Forms Forum

Posted 14 years ago by Crispin Horsfield - Software developer, Caz Limited
Avatar
I want to load a ToolWindow that contains a grid that is populated from a business object which in turn derives from database query. The ToolWindow will also contain a 'filter' ComboBox at the top, the clicking of which will cause a clone of the original business object to be created which is then appropriately filtered and bound to the grid.

It's clear that there will be quite a lot of code associated with this ToolWindow, so it should ideally be incorporated into its own object. The question is the best way to achieve this: inherit the ToolWindow class? create a user control? something else?

An example or outline of an approach would be useful.

TIA

Crispin

Comments (2)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Crispin,

With the UIStudio design you should be able to do either of those two things.

If you inherit the ToolWindow class, then make sure you call the base constructor that accepts a DockManager. Don't use the parameterless one since that is reserved for internal use.

Making a UserControl and assigning that as the child control of your tool window would work as well.

Both of those are good ideas so it's basically up to what you prefer.


Actipro Software Support

Posted 14 years ago by Crispin Horsfield - Software developer, Caz Limited
Avatar
Thanks for that.

I'm exploring the UserControl approach. Having fun at the moment working out how to persist control settings when the UserControl is closed...

Crispin
The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.