Example for xls export

Hi there.
Are there any example for the grid-export addon?
I followed docs and while i can add the action, i could not find way to link the button to the action.
I believe i miss some fundamental info, there, but i can not find any practical example to learn.

Thanks.

1 Like

Hello,

You can link the button to the action by using the action property of the button element. Here you can reference the defined table action.

Example:

<table id="tableId" dataContainer="tableDc">
    <actions>
        <action id="excelExport" type="excelExport"/>
    </actions>
    <columns>
        <column id="myCol"/>
    </columns>
    <buttonsPanel id="buttonsPanel" alwaysVisible="true">
        <button id="excelExportBtn" action="tableId.excelExport" />
    </buttonsPanel>
</table>

For general examples have a look at the github projects of the devs. For example the demo petclinic project: https://github.com/Haulmont/jmix-petclinic-online-demo

Hope that helps.

1 Like

Hi.

Of course it did help. I think i have just lost my cognitive abilities and panicked. The solution was pretty obvious. (and i feel dumb)
Thanks a lot, i am back on tracks.

Have a great day.