Hi there,
In server-side, SelectedValue property is used to get/set the value of selected item. In client-side, the property is split into 2: get_value() and set_value()... That's known and understood.
I have a scenario where I wish to cast the value of clicked Node of a tree to select the item with same value in a respective combobox. In server-side, I could easily achieve that:
However, when I tried the same in client-side, it didn't work!
Using set_value() didn't accomplish a thing! The only way to work this out was to search for the item with similar value THEN select it:
In light of that, I'm wandering why I can't accomplish said task fair and straight, thus, this workaround? What's the benefit of set_value() in this case? Is it a bug or Am I missing something here?
Regards,
Saed
In server-side, SelectedValue property is used to get/set the value of selected item. In client-side, the property is split into 2: get_value() and set_value()... That's known and understood.
I have a scenario where I wish to cast the value of clicked Node of a tree to select the item with same value in a respective combobox. In server-side, I could easily achieve that:
| Dim nodeValue As String = myTV.SelectedValue |
| myCombo.SelectedValue = nodeValue |
However, when I tried the same in client-side, it didn't work!
| var nodeValue = tree.get_selectedNode().get_value()); |
| combo.set_value(nodeValue); |
Using set_value() didn't accomplish a thing! The only way to work this out was to search for the item with similar value THEN select it:
| var nodeValue = tree.get_selectedNode().get_value()); |
| combo.findItemByValue(nodeValue).select(); |
In light of that, I'm wandering why I can't accomplish said task fair and straight, thus, this workaround? What's the benefit of set_value() in this case? Is it a bug or Am I missing something here?
Regards,
Saed