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

Disabling an Edit function in a Grid when inline editing is executed

1 Answer 476 Views
Grid
This is a migrated thread and some comments may be shown as answers.
CHARLES
Top achievements
Rank 1
CHARLES asked on 06 Feb 2013, 01:16 PM
I have 2 grids displayed on one page, our top Grid allows editing with a custom edit command.  Our lower grid allows for inline editing.  I want the ability to disable the top grid's custom Edit function (Edit button) when I click in the lower grid for inline editing using jQuery.  Below is what I have attempted

            $(function () {
                $(document).ready(function () {
                    var inlineEdit = $("#kendoGrid").data().kendoGrid.select().is(".k-grid-edit-row");
                        if (inlineEdit > 0) {
                            var edit = $("#kendoGrid").data("kendoGrid").find("k-grid-edit");
                            edit.hide();
                            e.preventDefault();
                            return false;
                       }
   });
                });

1 Answer, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 08 Feb 2013, 01:19 PM
Hello CHARLES,

I am afraid enabling / disabling the edit functionality of Kendo UI Grid at runtime is not supported at present. As a workaround I can suggest to attach a click handler on the edit buttons in the second grid and cover the first grid table with a transparent <div> element which will prevent it from editing. A similar scenario is explained at this forum thread.
 
Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
CHARLES
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Share this question
or