Databound event firing before Datasource.Read

2 posts, 0 answers
  1. Steve
    Steve avatar
    7 posts
    Member since:
    Jun 2013

    Posted 18 Oct Link to this post

    I understand the Databound event for the MVC grid is supposed to fire after the grid is fully rendered. But I'm seeing the databound event fires, then my read action fires, after which the databound event doesn't fire again. Below is my code for the grid. Anyone have an idea of what I'm doing wrong? Thanks in advance.

     

    @(Html.Kendo().Grid<dynamic>()
                .Name("StandardTable_" + Model.InstanceKey)
                .Resizable(resize => resize.Columns(true))
                .Pageable(pageable => pageable
                    .Input(true)
                    .Refresh(true)
                    .PageSizes(true)
                    .ButtonCount(5)
                    .Enabled(true)
                    .Numeric(false)
                ).ColumnMenu()
                .Sortable(s => s.SortMode(GridSortMode.MultipleColumn).AllowUnsort(true))
                .Filterable()
                .Groupable()
                .Reorderable(reorder => reorder.Columns(true))
                .Scrollable(e => e.Enabled(true).Virtual(true).Height("auto"))
                .EnableCustomBinding(true)
            .Events(e => e
                .DataBound("pan.dashboardsetup.gridDatabound(" + Model.dashFeed?.FeedKey + "," + Model.InstanceKey + ")")
                .ColumnMenuInit("pan.dashDatapart.menuInit")
                )
            .DataSource(d => d
                .Ajax()
                .PageSize(pageSize)
                .Read(read => read
                    .Action("StandardTableRead", "Feeds").Data("pan.dashDatapart.StandardGridRead(" + Model.dashFeed?.FeedKey + "," + Model.InstanceKey + ")")
                )
            )
    )
  2. Kostadin
    Admin
    Kostadin avatar
    1711 posts

    Posted 20 Oct Link to this post

    Hello Steve,

    I already answered your question in the support ticket you have opened with the same requirement. I would appreciate if we continue our conversation there.

    Regards,
    Kostadin
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top