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

Clicking buttons on grid not working

1 Answer 29 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shea
Top achievements
Rank 1
Shea asked on 11 Mar 2013, 07:23 AM
I have a minimal grid embedded in an .ascx file, which is embedded in a .aspx file.

<div class="grid-wrapper">
    <div id="equipment-data">
        <!-- grid will appear here -->
    </div>
</div>

$('#equipment-data').kendoGrid({
    toolbar: ["create", "save", "cancel"],
 
    columns: [
        { field: "ItemName", title: "Equipment", width: 260 },
        { field: "SerialNumber", title: "Unit #" }
    ]
});

Clicking on the 'add record', 'save', or 'cancel', causes the page to scroll to top, and the correct action is never taken. This code work in a minimal setup in a new project. The problem is this is a legacy project, and I need to figure out why I can't get the grid to work in this existing page.

The javascript console does not show any errors, even when the buttons are clicked. There seems to be no indication of why it isn't working.

EDIT: I attached attached to the click event breakpoint in chrome, and in my minimal example that works, the first handler for the click of the button is the jQuery click handler which then dispatches to a kendo handler. On my project that doesn't work, the jQuery handler is never called. Yet I recieve no errors about jQuery missing, and indeed the kendo grid renders and sorts fine (which I thought it would not do without jQuery. I am using the jQuery  1.8.3.

Thanks,
~S

1 Answer, 1 is accepted

Sort by
0
Shea
Top achievements
Rank 1
answered on 12 Mar 2013, 12:55 AM
It seems that having editable: false was the source of all my problems.... losing my mind.
Tags
Grid
Asked by
Shea
Top achievements
Rank 1
Answers by
Shea
Top achievements
Rank 1
Share this question
or