Default Create & Remove Action on tab

Hi,

I have a editor screen which includes several tabs. Those tabs contains records from other screen.
I want to add a create & Remove button on those tabs similar to default one from cuba.
In what way it can be done please?
As you can seen in below snapshot, three tabs are there in editor screen (each tab is a screen itself) but I want a create & Remove button in each tab.

das

So you display some data in tables. Those tables must be linked to collection datasources, containing some entities, say Foo on one tab and Bar on another. In order to create, edit and remove Foo and Bar entities, just add standard create, edit and remove actions to the tables, and then add buttons linked to the actions. You can see all this in any standard browse screen like this:

<table id="fooTable">
    <actions>
        <!-- standard actions -->
        <action id="create"/>
        <action id="edit"/>
        <action id="remove"/>
    </actions>
    <columns>
        <column id="field1"/>
        <column id="field2"/>
    </columns>
    <!-- datasource the table is linked to -->
    <rows datasource="fooDs"/> 
    <buttonsPanel>
        <!-- buttons linked to actions -->
        <button id="createBtn"
                action="fooTable.create"/>
        <button id="editBtn"
                action="fooTable.edit"/>
        <button id="removeBtn"
                action="fooTable.remove"/>
    </buttonsPanel>
</table>

Hi,

As you can see below, In those tabs, there are grids but no table. And I want to add those button somewhere in the tab or grid.

grs

Hi @knstvk ,

This is the layout of the editor screen:
la

And these are the datasourses:

ds

In those tabs, there are grids but no table. And I want to add those button somewhere in the tab or grid.

There is no difference between Table and DataGrid in this sense. Both can contain actions, ButtonsPanel, etc.

1 Like

Thank you. My bad, Now I know we can put those actions anywhere regardless table or tab.