or
var
grid = $(
"#mygrid"
).data(
"kendoGrid"
);
$(
this
).closest(
"tr"
).hide(
"slow"
);
var
row = grid.tbody.find(
">tr:hidden"
);
//Gives me the right one
grid.removeRow(row);
grid.refresh();
[{
"Year"
:2000,
"Make"
:
"Hyundai"
,
"Model"
:
"Elantra"
,
"Color"
:
"Bluish"
,
"Price"
:6000,
"Id"
:0},{
"Year"
:2001,
"Make"
:
"Hyundai"
,
"Model"
:
"Sonata"
,
"Color"
:
"Greenish"
,
"Price"
:16000,
"Id"
:1}
<
div
id
=
grid
>
</>
<
script
type
=
"text/javascript"
>
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: "http://localhost:3223/DataServices/DomainService.svc/JSON/GetDATA",
dataType: "json"
}
},
schema: {
data: "RootResults"
}
});
dataSource.read();
</
script
>
<
script
type
=
"text/javascript"
>
$(document).ready(function () {
$("#grid").kendoGrid({
dataSource: dataSource,
columns: [
{ title: "ID", field: "ID" },
{ title: "CODE1", field: "CODE1" },
{ title: "CODE2", field: "CODE2" }
],
height: 360,
groupable: false,
sortable: false,
pageable: false,
scrollable: false
});
});
</
script
>
$(
"#chart"
).kendoChart({
theme: $(document).data(
"kendoSkin"
) ||
"default"
,
dataSource: {
transport: {
read: {
url:
"/WebServices/WebFunctions.asmx/RetrieveProjectCountByBMP"
,
dataType:
"json"
}
},
schema: {
model: {
fields: {
Code: { type:
"string"
},
Count: { type:
"number"
}
}
}
},
sort: {
field:
"Code"
,
dir:
"asc"
}
},
title: {
text:
"Project Count by BMP"
},
seriesDefaults: {
type:
"column"
},
series: [{
field:
"Count"
,
name:
"Project Count"
}],
categoryAxis: {
field:
"Code"
},
tooltip: {
visible:
true
,
format:
"{0:N0}"
}
});
<WebMethod(EnableSession:=
True
)> _
Public
Function
RetrieveProjectCountByBMP()
As
Object
Dim
returnData = (From p
As
Project
In
Project.RetrieveAll() _
Join cs
As
ClaimScope
In
ClaimScope.RetrieveAll()
On
p.ProjectId Equals cs.ProjectId _
Join b
As
BMP
In
BMP.RetrieveAll
On
cs.BMPId Equals b.BMPId _
Where (p.ProjectMilestoneId = 17
Or
p.ProjectMilestoneId = 18
Or
p.ProjectMilestoneId = 19) _
And
p.FiscalyearId = 5 _
Select
b.Code, p.ProjectId).GroupBy( _
Function
(bmpCode) bmpCode.Code _
,
Function
(proj) proj.ProjectId _
,
Function
(bmpCode, projects)
New
With
{.Code = bmpCode, .Count = projects.Count()})
Dim
serializedReturnData
As
JavaScriptSerializer =
New
JavaScriptSerializer(returnData)
Return
serializedReturnData.Serialize(serializedReturnData)
Return
serializedReturnData
End
Function
<
div
id
=
"grid"
data-role
=
"grid"
data-bind
=
"source: gridSource"
></
div
>
<
div
id
=
"grid"
data-role
=
"grid"
data-bind
=
"source: gridSource, selectableGrid: selectOptions"
></
div
>