Hi There, i cannot get the datasource to work. Specifically the issue is passing the GET parameter. The only way i've gotten the read to work is to place the paramter directly in the READ URL:
$(document).ready(function () {
var dsCategories = new kendo.data.DataSource({
transport: {
read: "/CostDriver/GetCostDriverCategoriesByRegion/" + $("input[name='region']:checked").val() ,
...
The issue is, on the click of radio button from where this value is coming from, the read uses the ORIGINAL value from the radiobuttongroup from when the page initially loads. Onclick of this radiobuttongroup calls the datasource read but the new value is NEVER sent.
HOW HOW HOW do you properly use the DATA property in the transport? I have tried everything and it does not work.
$(document).ready(function () {
var dsCategories = new kendo.data.DataSource({
transport: {
read: "/CostDriver/GetCostDriverCategoriesByRegion/",
data: { "regionId": $("input[name='region']:checked").val() }
}
});
$("#selectCategory").width(180).kendoComboBox({
dataTextField: "CostDriverCategoryName",
dataValueField: "CostDriverCategoryId",
dataSource: dsCategories
});
$("#selectCommodity").width(180).kendoComboBox({ enabled: false });
$("input[name='region']").click(function () {
alert($("input[name='region']:checked").val());
dsCategories.read();
});
});
$(document).ready(function () {
var dsCategories = new kendo.data.DataSource({
transport: {
read: "/CostDriver/GetCostDriverCategoriesByRegion/" + $("input[name='region']:checked").val() ,
...
The issue is, on the click of radio button from where this value is coming from, the read uses the ORIGINAL value from the radiobuttongroup from when the page initially loads. Onclick of this radiobuttongroup calls the datasource read but the new value is NEVER sent.
HOW HOW HOW do you properly use the DATA property in the transport? I have tried everything and it does not work.
$(document).ready(function () {
var dsCategories = new kendo.data.DataSource({
transport: {
read: "/CostDriver/GetCostDriverCategoriesByRegion/",
data: { "regionId": $("input[name='region']:checked").val() }
}
});
$("#selectCategory").width(180).kendoComboBox({
dataTextField: "CostDriverCategoryName",
dataValueField: "CostDriverCategoryId",
dataSource: dsCategories
});
$("#selectCommodity").width(180).kendoComboBox({ enabled: false });
$("input[name='region']").click(function () {
alert($("input[name='region']:checked").val());
dsCategories.read();
});
});