I am new to Kendo, I have a dropdownList and on Change I would like to set all of the rows in the dropDownList to "Sold" . Right now I do have the change portion of the DropDownList working but can not seem to change the value of any rows . This is my code and I am trying to follow this example here anyways this is my code below . I have about 12 rows and my field name is Names . I am also getting an error when I try to complete that below and it says Uncaught TypeError: Cannot read property 'set' of undefined . Any suggestions on getting this resolved would be great . Again all I am trying to do is set all the rows below dropdownList with the field Names to John when someone changes value in the dropdown .
<div id=
"MyGrid"
style=
"text-align: center;"
> </div>
function
statusUpdate(element)
{
element.element.kendoDropDownList({
optionLabel:
"-Select-"
, dataTextField:
"text"
, dataValueField:
"value"
,
dataSource: [{ text:
"Scott"
, value:
"Scott"
},{ text:
"Sam"
, value:
"Sam"
}],
change:
function
(e) {
var
grid = $(
"#MyGrid"
).data(
"kendoGrid"
);
var
dataItem = grid.dataSource.get(2);
dataItem.set(
"Names"
,
"John"
);
}
})
}