This is a migrated thread and some comments may be shown as answers.

Value in AutoComplete not saved after being set programatically

1 Answer 137 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
M
Top achievements
Rank 1
M asked on 21 Nov 2012, 09:21 AM
I've got an inline editable grid setup with two AutoComplete fields. When something is selected in one of the AutoCompletes, I'm using some of the additional data in the dataItem to set the value of the other AutoComplete.

This is all seems to be working visually -- the appropriate value appears in the second AutoComplete when the first is selected, but on saving the row, the value of the second AutoComplete is blank.

It's not a problem with the create/update functions, as the value of the second autoComplete is saved if I actually select a value.

Can anyone explain why this is happening?

Thanks

1 Answer, 1 is accepted

Sort by
0
M
Top achievements
Rank 1
answered on 21 Nov 2012, 09:34 AM
UPDATE: Strangely, I've found that if I use:
autocomplete2.data("kendoAutoComplete").suggest(dataItem.item);
rather than:
autocomplete2.data("kendoAutoComplete").value(dataItem.item);
the value of the second AutoComplete is saved. There's a bit of flickering as input seems to jump between the two widgets, but at least it works.

Is this a bug?
Tags
AutoComplete
Asked by
M
Top achievements
Rank 1
Answers by
M
Top achievements
Rank 1
Share this question
or