How to add a file upload button onto a grid toolbar

1 Answer 111 Views
Grid Toolbar Upload
Monica
Top achievements
Rank 1
Monica asked on 05 Dec 2023, 07:28 PM

Hello!

I am trying to add a <kendo-upload> tag onto the toolbar of a kendo grid using TagHelper and ASP.NET Core

Though I am struggling with figuring out how to do this,  I have followed this template: https://demos.telerik.com/aspnet-core/grid/toolbar-template to not much success. 

My goal is to simply add a file upload option to upload an excel file to populate the fields of a grid!

Any ideas on how to progress?

Thank you!

But I am still struggling

1 Answer, 1 is accepted

Sort by
0
Mihaela
Telerik team
answered on 08 Dec 2023, 11:11 AM

Hello Monica,

You can use the Template component to define the Upload component into the Grid's ToolBar. For example:

<kendo-grid name="grid" height="500">
    <toolbar>
                <toolbar-button>
                    <toolbar-command-template>
                        <kendo-upload name="files">
                            <async auto-upload="true" save-url="@Url.Action("Async_Save", "Upload")" remove-url="@Url.Action("Async_Remove", "Upload")" />
                        </kendo-upload>
                    </toolbar-command-template>
                </toolbar-button>
  </toolbar>
  ...
</kendo-grid>

If you have any further questions, please let me know.

 

Regards,
Mihaela
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.
Tags
Grid Toolbar Upload
Asked by
Monica
Top achievements
Rank 1
Answers by
Mihaela
Telerik team
Share this question
or