Pass data to controller on refresh.

1 posts, 0 answers
  1. Alan Mosley
    Alan Mosley avatar
    200 posts
    Member since:
    Apr 2010

    Posted 15 Apr 2014 Link to this post

    I am trying to pass data to the controller using MVC wrappers. But data not being send, controller is executing but data is not passed. am I doing things correctly?
    Thanks

    var chart = $("#SalesChart").data("kendoChart");chart.refresh({    data: { "FromDate": $("#FromDate").data("kendoDatePicker").value(), "ToDate": $("#ToDate").data("kendoDatePicker").value() }});


    Function GetSalesByDate(salesByDate As BO.Models.Statistics.SalesByDate) As JsonResult
             Return Json(BO.Factory.Statistics.GetSalesByDateData(BO.Factory.Statistics.GetSalesByDate))
         End Function



     ​
    @code
              Dim SalesChart As Kendo.Mvc.UI.Chart(Of BO.Models.Statistics.SalesTimeSpan) = _
                  Html.Kendo.Chart(Of BO.Models.Statistics.SalesTimeSpan).Legend(False).
              Name("SalesChart").Title("Units sold").Series(Sub(series)
                                                                    series.Line(Function(model) model.Value, categoryExpression:=Function(model) model.Period).
                                                                    Aggregate(ChartSeriesAggregate.Avg)
                                                            End Sub).
          CategoryAxis(Function(axis) axis.Date().BaseUnit(ChartAxisBaseUnit.Days)).
          DataSource(Function(ds) ds.Read(Function(read) read.Action("getsalesbydate", "statistics", New With {.area = String.Empty})))
     
              SalesChart.Render()
     
     
          End Code
Back to Top