grid rowaction does not execute

2 posts, 0 answers
  1. Yilang
    Yilang avatar
    22 posts
    Member since:
    Jan 2016

    Posted 08 Dec 2016 Link to this post

    @model IEnumerable<dynamic>
    @(
     Html.Kendo().Grid(Model).Name("resgrid")
     .RowAction(row =>
     {
         row.HtmlAttributes["style"] = "background:red;";
     })
     .CellAction(cell =>
     {
                  cell.HtmlAttributes["style"] = "background:red;";
     })
     .DataSource(ds => ds.Custom()
        .Transport(t=>t.Read(r =>
        {
            r.Url("../Report/ResultGridRead/" + @ViewBag.ID).DataType("json");
        }))
        )
        .Events(e=>e.DataBinding("DataBinding").DataBound("DataBound"))
    )
  2. Kostadin
    Admin
    Kostadin avatar
    1733 posts

    Posted 12 Dec 2016 Link to this post

    Hi Yilang,

    Please note that  the "RowAction" is available only for rows that are rendered on server side, when the records are loaded using Ajax request the action is not executed. Could you please verify that you are using a custom server binding? I would appreciate if you share the entire View and Controller in order to examine it further.

    Regards,
    Kostadin
    Telerik by Progress
    Telerik UI for ASP.NET MVC is ready for Visual Studio 2017 RC! Learn more.
Back to Top