Question

I'm working with KendoUI MVC Complete and the DataViz charting package. I've got the DataBound event hooked up and firing very well, but I can't seem to get the DataBinding event to fire.

In the documentation, ChartEventBuilder does have a DataBinding method and I implement it exactly as specified but it never gets handled. In the docs for ChartEventBuilder.DataBinding method details, it points to the javascript documentation for the dataBinding event, but that anchor doesn't exist (and the dataBinding event doesn't exist either)!

Kendo.Mvc.UI.Fluent.ChartEventBuilder DataBinding link HERE

... and that page has a link that points to this page where the dataBinding event documentation doesn't exist kendo.dataviz.ui.Chart DataBinding link HERE but doesn't exist

It's very confusing since this event for the MVC extension clearly exists but doesn't seem to do anything. Or - am I doing it wrong? I'm hoping someone can point me to a working example since none of the demos on the Kendo site show this Chart DataBinding event in practice.

Was it helpful?

Solution

The DataBinding event shouldn't exist in the ChartEventBuilder.

It was probably carried over by mistake during the migration from the legacy Telerik MVC Extensions.

Use the DataSource RequestStart event instead:

@(Html.Kendo().Chart<MyModel>()
    .Name("chart")
    .DataSource(ds => ds
        .Read(read => read.Action("Data", "Chart"))
        .Events(events => events.RequestStart("onRequestStart"))
    )
    // ...
)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top