Telerik RadCombobox 在使用客户端 requestItems() 加载时不保持状态

发布于 2024-09-08 11:03:40 字数 414 浏览 1 评论 0原文

我正在使用 Telerik RadComboBox 控件。我有两个相关的组合,当用户在第一个组合中选择一个值时,我会过滤第二个组合。

我使用下面的代码来实现这一点:

localeCombo = $find("<%= ddlLocale.ClientID %>");
localeCombo.requestItems(item.get_value(), false);

这完全正常,但是当我进行回发时,我的过滤组合将重置为原始的非过滤列表,尽管所有其他控件都保留其状态。我认为这是因为当我使用客户端回调 requestItems() 函数时,服务器端项目列表没有更新。

是这样吗?有没有一个简单的方法可以解决这个问题?

任何帮助将不胜感激!

谢谢克里斯

I'm using the Telerik RadComboBox control. I have two related combos and when the user selects a value in the first one I filter the second one.

I use the code below to achieve this:

localeCombo = $find("<%= ddlLocale.ClientID %>");
localeCombo.requestItems(item.get_value(), false);

This works totally fine, but when I do a postback my filtered combo resets to the original non filtered list, although all other controls retain their state. I assume this is because the server side list of items is not being updated when I use the client side callback requestItems() function.

Is this the case? Is there a simple way around this?

Any help would be much appreciated!

Thanks

Chris

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

梦里人 2024-09-15 11:03:41

这是 RadComboBox 的一个错误。我开了一张票。

This is a bug with RadComboBox. I opened a ticket.

单身狗的梦 2024-09-15 11:03:40

是的,你的建议很可能是正确的。您可以尝试将第二个过滤组合值保留在会话或缓存存储中,然后在回发时从那里恢复它 - 至少这是我会做的。

Yep, most probably your suggestion is true. You may try keeping the second filtered combo value in session or cache storage and then restore it from there on postback - at least this is what I would do.

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