Active Query Builder allows to customize objects added to the Design Pane via the QueryBuilder.DatasourceAdded event.
The followng code checks all fields of the newly added datasource. The next sample illustrates adding of alias for a newly added datasource.
private void queryBuilder1_DataSourceAdded(SQLQuery sender, DataSource addedObject)
{
    // Select all fields
    QueryColumnList queryColumnList = addedObject.ParentUnionSubQuery.QueryColumnList;
    queryColumnList.BeginUpdate();

    try
    {
        MetadataSelection<MetadataField> fields = addedObject.Metadata.Fields;

        foreach (MetadataField field in fields)
        {
            QueryColumnListItem queryColumn = queryColumnList.FindField(addedObject, field.Name);

            if (queryColumn == null)
                queryColumn = queryColumnList.AddField(addedObject, field.Name);

            queryColumn.Selected = true;

        }
    }
    finally
    {
        queryColumnList.EndUpdate();
    }
}
private void queryBuilder1_DataSourceAdded(SQLQuery sender, DataSource addedObject)
{
    if (addedObject.MetadataObject != null)
    {
        using (AstTokenIdentifier alias = sender.CreateUniqueAlias(addedObject.ParentUnionSubQuery, addedObject.MetadataObject.Name))
        {
            addedObject.Alias = alias.Token;
        }
    }
}
private void queryBuilder_DatasourceAdded(UnionSubQuery query, DataSource addedObject)
{
    // Select all fields

    CriteriaList cl = query.CriteriaList;
    CriteriaItem ci;
     
    cl.BeginUpdate();
     
    try
    {
        for (int i = 0; i < addedObject.Fields.Count; i++)
        {
            ci = cl.FindField(addedObject, addedObject.Fields[i].Name);
             
            if (ci == null)
            {
                ci = cl.AddField(addedObject, addedObject.Fields[i].Name);
            }
             
            ci.Select = true;
        }
    }
    finally
    {
        cl.EndUpdate();
    }
}
private void queryBuilder_DatasourceAdded(UnionSubQuery query, DataSource addedObject)
{
    if (addedObject.MetadataObject != null)
    {
        using (AstTokenIdentifier alias = query.CreateUniqueAlias(addedObject.MetadataObject.Name))
        {
            addedObject.Alias = alias.Token;
        }
    }
}

Is this article helpful for you?