RadComboBox,如何获取selectedItem
Dim sb As StringBuilder = New StringBuilder()
sb.Append("<script language=javascript>")
sb.Append(" function SetValueInBody() {")
sb.Append(" var _dllGetDynamicFieldKey = $find('" + _dllGetDynamicFieldKey.ClientID + "');")
sb.Append(" alert('Set Value: ' + _dllGetDynamicFieldKey.SelectedItem);")
sb.Append(" }")
sb.Append("</script>")
我正在尝试从 Jquery 中的 radComboBox 获取所选项目,目的是针对它填充 RadEditor。我在后端生成 JS,如上所述,其中 dllGetDynamicFieldKey 是 RadComboBox,上面的方法是我所看到的获取所选值的方法,但是当警报触发时,它总是返回未定义的值。有什么想法是正确的吗?
Dim sb As StringBuilder = New StringBuilder()
sb.Append("<script language=javascript>")
sb.Append(" function SetValueInBody() {")
sb.Append(" var _dllGetDynamicFieldKey = $find('" + _dllGetDynamicFieldKey.ClientID + "');")
sb.Append(" alert('Set Value: ' + _dllGetDynamicFieldKey.SelectedItem);")
sb.Append(" }")
sb.Append("</script>")
I'm trying to get the selected item from a radComboBox in Jquery with the intention of populating a RadEditor against it. I'm generating teh JS in the back end as above where dllGetDynamicFieldKey is the RadComboBox, the above method is how I've seen it done to get the selected value however it always comes back undefined for me when the alert is fired. Any ideas whats correct?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
抱歉,明白了,我应该使用 .get_value() 来获取选择
Apologies, got it, I should have used .get_value() to get the selection