Hi Ken-Do's,
I am still quite new with Kendo, so please bear with me ; )
Right now, I am trying to force a grid to refresh with a new datasource url set by a different widget (a dropdown, but it shouldn't matter).
The event is triggered, the var is set, but the grid doesn't refresh, anyone got an idea?
The source is attached and also viewable live here:
trinamic.com/psearch
Kind regards, Ubbo
I am still quite new with Kendo, so please bear with me ; )
Right now, I am trying to force a grid to refresh with a new datasource url set by a different widget (a dropdown, but it shouldn't matter).
The event is triggered, the var is set, but the grid doesn't refresh, anyone got an idea?
The source is attached and also viewable live here:
trinamic.com/psearch
Kind regards, Ubbo
<!doctype html>
<
html
>
<
head
>
<
title
>Parametric Search</
title
>
<
script
src
=
"source/js/kendo.all.js"
></
script
>
<
link
href
=
"styles/kendo.common.css"
rel
=
"stylesheet"
/>
<
link
href
=
"styles/kendo.default.css"
rel
=
"stylesheet"
/>
<
link
href
=
"styles/examples.css"
rel
=
"stylesheet"
/>
<
link
href
=
"styles/examples-offline.css"
rel
=
"stylesheet"
/>
<
link
href
=
"source/styles/kendo.common.css"
rel
=
"stylesheet"
/>
<
link
href
=
"source/styles/kui_tmc.css"
rel
=
"stylesheet"
/>
<
script
src
=
"source/js/jquery.min.js"
></
script
>
<
script
src
=
"source/js/kendo.core.js"
></
script
>
<
script
src
=
"source/js/kendo.fx.js"
></
script
>
<
script
src
=
"source/js/kendo.popup.js"
></
script
>
<
script
src
=
"source/js/kendo.data.js"
></
script
>
<
script
src
=
"source/js/kendo.list.js"
></
script
>
<
script
src
=
"source/js/kendo.dropdownlist.js"
></
script
>
<
script
src
=
"source/js/kendo.draganddrop.js"
></
script
>
<
script
src
=
"source/js/kendo.resizable.js"
></
script
>
<
script
src
=
"source/js/kendo.splitter.js"
></
script
>
<
script
src
=
"source/js/kendo.draganddrop.js"
></
script
>
<
script
src
=
"source/js/kendo.slider.js"
></
script
>
<
script
src
=
"source/js/kendo.all.js"
></
script
>
<
script
src
=
"js/kendo.mobile.min.js"
></
script
>
<
script
src
=
"source/js/console.js"
></
script
>
<
script
src
=
"content/shared/js/console.js"
></
script
>
<
link
href
=
"styles/kendo.common.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"styles/kendo.mobile.all.min.css"
rel
=
"stylesheet"
/>
</
head
>
<
body
>
<
div
id
=
"psview"
class
=
"k-content"
>
<
h2
>Parametric Search</
h2
>
<
input
id
=
"motor"
/>
<
div
id
=
"results"
></
div
>
<
script
>
$(document).ready(function() {
$("#motor").kendoDropDownList({
dataSource: new kendo.data.DataSource({
data: [
{
text: "BLDC"
},
{
text: "Piezo"
}]
}),
change: function(e) {
alert(exturl);
},
close: function(e) {
// get a reference to the grid widget
var regrid = $("#results").data("kendoGrid");
// refreshes the grid
regrid.refresh();
alert('closed');
}
});
$("#results").kendoGrid({
dataSource: {
transport: {
read: {
url: exturl,
dataType: "json"
}
}
},
height: 250,
scrollable: false,
sortable: true,
filterable: true,
pageable: false,
columns: [
{field: "name",title: "Name"},
{field: "type",title: "Type"},
{field: "motor",title: "Motor"},
{field: "link",title: "Link"}
]
});
});
</
script
>
</
div
>
</
body
>
</
html
>