Server Bound MVC Grid

3 posts, 0 answers
  1. Neil
    Neil avatar
    32 posts
    Member since:
    Aug 2016

    Posted 16 Aug 2017 Link to this post

    I can't seem to find the answers to these questions.


    1) Can you apply a double click to the row when server binding the grid, I've tried the following code in the OnDataBound function but it doesn't execute when double clicking the row?

    2) I could also use a custom command button as well instead of the double click, but I can't find a handle to the row when I fire the the following script.

    Double Click row script.

                    function (e) {
                        var rowData = that.dataItem(this);


    Custom Command button script.

    columns.Command(command =>
    function ViewDatasheet(e) {
            var dataItem = this.dataItem($(e.currentTarget).closest("tr")); -> This line causes the attached script error.
            idcount = dataItem.Id;
                type: "POST",
                url: '@Url.Action("CheckForAssignedTemplate", "Data")',
                contentType: "application/json; charset=utf-8",
                data: JSON.stringify({ moduleid: @Model.TheModule.Id, idcount: idcount }),
                dataType: "json",
                success: function(result) {
                    if (result.datasheetid !== "") {
                        location.href = '@Url.Action("Index", "Datasheet")?datasheetid=' + result.datasheetid;
                    } else {
                        var window = $("#window_newDataSheet").data("kendoWindow");
                error: function() {

  2. Neil
    Neil avatar
    32 posts
    Member since:
    Aug 2016

    Posted 16 Aug 2017 in reply to Neil Link to this post

    I figured out a work around. In my case I was trying to find the Id for the row. Here's how I found it.


    2 = ordinal of the column in the grid row


  3. Boyan Dimitrov
    Boyan Dimitrov avatar
    2062 posts

    Posted 18 Aug 2017 Link to this post

    Hello Neil,

    The problem you are facing is that when Kendo UI Grid is server bound the DataSource is empty since there are no client-side operations. All operations are performed on the server only and the Kendo UI DataSource does not contain any data. 

    Boyan Dimitrov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top