Query ValueGroupDatasourceImpl without widget filter

I have a ValueGroupDatasourceImpl with a group table and I would like to be able to filter the data that appears in it, I understand that the filter widget does not work since it launches the queries against the database, how can I filter “only” the information contained in the ValueGroupDatasourceImpl without consulting the database?
Thank you and greetings.

Hi,
The filter component cannot work with ValueDatasources because it requires an entity, while ValueDatasource is designed for single attributes.
However, you can filter data in value datasources using custom filters embedded in the datasource queries. See Query Filter in the docs.
For example, the following screen filter the value datasource by the value entered in the customerFilterField text field:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://schemas.haulmont.com/cuba/window.xsd"
        caption="msg://browseCaption"
        class="com.company.sales.gui.order.OrderValues"
        focusComponent="ordersTable"
        lookupComponent="ordersTable"
        messagesPack="com.company.sales.gui.order">
    <dsContext>
        <valueGroupDatasource id="valueDs">
            <query>
                <![CDATA[select e.date, e.amount from sales$Order e]]>
                <filter>
                    <c>e.customer.name like :component$customerFilterField</c>
                </filter>
            </query>
            <properties>
                <property datatype="dateTime"
                          name="date"/>
                <property datatype="decimal"
                          name="amount"/>
            </properties>
        </valueGroupDatasource>
    </dsContext>
    <dialogMode height="600"
                width="800"/>
    <layout expand="ordersTable"
            spacing="true">
        <hbox spacing="true">
            <textField id="customerFilterField"/>
        </hbox>
        <groupTable id="ordersTable"
                    width="100%">
            <actions>
                <action id="create"/>
                <action id="edit"/>
                <action id="remove"/>
                <action id="refresh"/>
            </actions>
            <columns>
                <column id="date"/>
                <column id="amount"/>
            </columns>
            <rows datasource="valueDs"/>
            <rowsCount/>
            <buttonsPanel id="buttonsPanel"
                          alwaysVisible="true">
                <button id="createBtn"
                        action="ordersTable.create"/>
                <button id="editBtn"
                        action="ordersTable.edit"/>
                <button id="removeBtn"
                        action="ordersTable.remove"/>
                <button action="ordersTable.refresh"/>
            </buttonsPanel>
        </groupTable>
    </layout>
</window>

Thanks Konstantin, I can not use the solution that you tell me since the construction of the table I do it by code with what is dynamic generating the columns by the properties of the valuedatasource so I do not know the columns that formed it until the moment of the execution.
Greetings.