Active Query Builder support area

How to use DevExpress controls UI in AQB 2 WinForms Edition?

Last modified:


To use DevExpress controls, you should add a reference to the ActiveQueryBuilder.DevExpressControlFactory.dll file to your project, or you can put this assembly next to your executable file. In the Main() function of your application, before any form creation, set up the DevExpress usage and turn on the QueryBuilder.UseDevExpressControls static property:

      DevExpress.Skins.SkinManager.EnableFormSkins();
      ActiveDatabaseSoftware.ActiveQueryBuilder.QueryBuilder.UseDevExpressControls = true;

Additionally, you can define the QueryBuilder.OverrideDevExpressThemeColors static property to True to use colors settings of the component instead of using colors from the current DevExpress theme.

Working with Visual Basic, you should use the My.Application.Startup event.

Your project must refer to DevExpress.Data.*, DevExpress.Utils.*, DevExpress.XtraEditors.*, DevExpress.XtraGrid.* and DevExpress.XtraTreeList.* assemblies and the ActiveDatabaseSoftware.DevExpressControlFactory2.dll.

If you have the "Failed to call GetCustomTreeView() method from DevExpressControlFactory" error, please check the following:

  1. Make sure that you have the same DevExpress controls version as referred by the DevExpressControlFactory assembly. We strive to refer to the latest DevExpress version, but there could be a small gap between the latest and the referred version. If you have a newer version of DevExpress controls, you can override version binding as described in this article: How to configure assembly binding redirection?
  2. If you refer to the same version of DevExpress assemblies, but still have this problem, please set the "Copy Local" property of referred DevExpress and Active Query Builder assemblies to True.
    Note that the Professional .NET Subscription is shipped with the source code of DevExpress controls factory assembly, even if you didn't purchase the Full Source Code option, so you can recompile it with any DevExpress controls version that you have, considering that no changes were made in the DevExpress controls API since that time.

Is this article helpful for you?