RadComboBox,如何获取selectedItem

发布于 2024-08-21 23:50:27 字数 628 浏览 4 评论 0原文

            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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

镜花水月 2024-08-28 23:50:27

抱歉,明白了,我应该使用 .get_value() 来获取选择

Apologies, got it, I should have used .get_value() to get the selection

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文