or
<div id="example" class="k-content"> <div id="grid"></div><divclass="console"></div> <script> $(document).ready(function (options) { var company= '<?php echo $_GET["workingcompany"]; ?>'; var crudServiceBaseUrl = "../../data", dataSource = new kendo.data.DataSource({ transport: { read: { url: "http://www.northpier.org/data/fetchcap.php?company="+company, dataType: "json" },update: { url: "http://www.northpier.org/data/Updatecap.php?company="+company, type: "PUT", dataType: "jsonp" }, destroy: { url: crudServiceBaseUrl + "/destroy.php", dataType: "json" }, create: { url: crudServiceBaseUrl + "/create.php", dataType: "json" }, parameterMap: function(options, operation) { if (operation !== "read" && options.models) { return {models: kendo.stringify(options.models)}; } } }, batch: true, pageSize: 30, schema: { model: { id: "id", fields: { id: { type: "string", editable: false }, date_time: { type: "string"}, Name: { type: "string", editable: true }, Common: { type: "number", validation: { required: true, min: 0} }, SeriesA: { type: "number", validation: { required: true, min: 0} }, SeriesB: { type: "number", validation: { required: true, min: 0} }, SeriesC: { type: "number", validation: { required: true, min: 0} }, } } } }); $("#grid").kendoGrid({ dataSource: dataSource,filterable:true,groupable:true, navigatable: true, pageable: true, height: 400, toolbar: ["create", "save", "update", "cancel"], columns: [{ field: "Name", title: "Name", editable: true, }, { field: "Common", title: "Common", }, { field: "SeriesA", title: "Series A", }, { field: "SeriesB", title: "Series B", }, { field: "SeriesC", title: "Series C", }], columnMenu:{ messages:{ columns:"Choose columns", filter:"Apply filter", sortAscending:"Sort (asc)", sortDescending:"Sort (desc)" } }, editable: true, change: function() { console.log("change event"); }, edit: function() { console.log("edit event"); }, save: function() { console.log("save event"); }, saveChanges: function() { console.log("saveChanges event"); $('#grid').data().kendoGrid.refresh(); }, remove: function() { console.log("remove event"); } }); }); </script> </div><?php$dbhost = 'localhost:3036';$dbuser = 'XXXXXXXXXXXXX';$dbpass = 'XXXXXXXXXXXXXXX';$conn = mysql_connect($dbhost, $dbuser, $dbpass);if(! $conn ){ die('Could not connect: ' . mysql_error());}parse_str(file_get_contents("php://input"),$post_vars);$comp = $_GET['company'];$mod = $_GET['models'];$request = json_decode($mod);foreach ($request as $product) {$sql = "UPDATE captable SET Name='$product->Name', Common='$product->Common', SeriesA='$product->SeriesA', SeriesB='$product->SeriesB', SeriesC='$product->SeriesC' WHERE id='$product->id'";mysql_select_db('XXXXXXXXXXX');$retval = mysql_query( $sql, $conn );if(!$retval ){ echo "OUCH!"; //die('Could not update data: ' . mysql_error());}else{ $result3 = null;echo $result3;}}mysql_close($conn);?>Country Project Product DatePhilippines Project1 Product A 1-May-13Philippines Project1 Product B 1-May-13Philippines Project1 Product C 1-May-13Japan Project2 Product D 3-Jun-13Japan Project2 Product E 3-Jun-13@(Html.Kendo().Editor() .Name("sectionBlockEditor") .HtmlAttributes(new { style = "width: 900px;height:530px" }) .Tools(tools => tools .Clear() .Formatting() .CustomTemplate(ct => ct.Template("<label for='templateTool' style='vertical-align:middle;'>Background:</label> <select id='templateTool'><option value=''>none</option><option value='\\#ff9'>yellow</option><option value='\\#dfd'>green</option></select>")) ) )@model List<Kendo.Mvc.Examples.Models.StockDataPoint>
series.Column(model => model.Close)
) how could I do that exactly ?
@model IEnumerable<Kendo.Mvc.Examples.Models.StockDataPoint><div class="chart-wrapper"> @(Html.Kendo().Chart(Model) .Name("chart") .Title("Stock Prices") .DataSource(dataSource => dataSource .Read(read => read.Action("_StockData", "Scatter_Charts")) .Group(group => group.Add(model => model.Symbol)) .Sort(sort => sort.Add(model => model.Date).Ascending()) ) .Series(series => { series.Column(model => model.Close) .Name("#= group.value # (close)"); }) .Legend(legend => legend .Position(ChartLegendPosition.Bottom) ) .ValueAxis(axis => axis.Numeric() .Labels(labels => labels .Format("${0}") .Skip(2) .Step(2) ) ) .CategoryAxis(axis => axis .Categories(model => model.Date) .Labels(labels => labels.Format("MMM")) ) ) </div>