This is a migrated thread and some comments may be shown as answers.

Edit Button outside of grid?

2 Answers 468 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Elliott
Top achievements
Rank 1
Elliott asked on 06 Nov 2013, 12:20 PM
I was wondering if the following is possible?
I have a custom command button in my grid:

columns.Command(command =>
        {
            command.Custom("options").Text("...").Click("showMenu");
        });

This opens a small menu next to the button that contains a few options.

I am wondering if it is possible to have the edit button on this menu?

I can get the row data like so:
var grid = $("#grid").data("kendoGrid");
var dataItem = grid.dataItem($(e.currentTarget).closest("tr"));

How do I then call the edit popup for the row?

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 06 Nov 2013, 01:22 PM
Hi Elliott,

In order to achieve this you should hook up to the click event of your custom button, find the respective Grid row element and pass it to the editRow method. In this way the widget will put the row in edit mode and popup editor window will open (assuming that the Grid is configured for popup editing).

For more information and code sample please check the relevant documentation:

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Elliott
Top achievements
Rank 1
answered on 06 Nov 2013, 04:52 PM
That has done the job!
Thanks!
Tags
Grid
Asked by
Elliott
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Elliott
Top achievements
Rank 1
Share this question
or