Hi,
I am using plain HTML and jquery to create kendo comboboxes and bind data to it. My problem is that I want to change the datatextfield and datavaluefield of the combo based on some values. Initially what I will do is I shall initialise the combobox like this
$("#TestControl").kendoComboBox(
{
placeholder: "Select Product",
filter: "contains",
autoBind: false,
suggest: true,
minLength: 0
});
Then at some other place I wnat to assign the datatextproperty to the control something like this.
auto = $("#TestControl").data("kendoComboBox");
auto.setDataSource(dataSource); // this line works
auto.options.dataValueField = autoCompleteValueField; // this line I am not sure (autoCompleteValueField is a variable which has a value)
auto.options.dataTextField = autoCompleteTextField; // this line I am not sure (autoCompleteTextField is a variable which has a value)
Can this be done or is there a way to do it? Please do help
Thanks in advance
Regards,
Vijay
I am using plain HTML and jquery to create kendo comboboxes and bind data to it. My problem is that I want to change the datatextfield and datavaluefield of the combo based on some values. Initially what I will do is I shall initialise the combobox like this
$("#TestControl").kendoComboBox(
{
placeholder: "Select Product",
filter: "contains",
autoBind: false,
suggest: true,
minLength: 0
});
Then at some other place I wnat to assign the datatextproperty to the control something like this.
auto = $("#TestControl").data("kendoComboBox");
auto.setDataSource(dataSource); // this line works
auto.options.dataValueField = autoCompleteValueField; // this line I am not sure (autoCompleteValueField is a variable which has a value)
auto.options.dataTextField = autoCompleteTextField; // this line I am not sure (autoCompleteTextField is a variable which has a value)
Can this be done or is there a way to do it? Please do help
Thanks in advance
Regards,
Vijay