显示/隐藏和更新组合框 [英] Show/hide and update combo box

查看:73
本文介绍了显示/隐藏和更新组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有一个情况,如果有人帮助我,我会很感激。我不确定这是js还是html但是这里有。我有一个主要的组合框(mcb)我正在显示一些值。


根据用户选择的内容,应该在同一页面上显示2个组合框。第一个组合框(CB1)应该填充一些值。然而,第二个(CB2)应该根据CB1中选择的内容加载。然后,UN2,CB2应为空(但可见)。当用户在CB1中选择一个值,然后选择CB2,第三个组合框时,应显示CB3。根据CB2中选择的内容,CB3已经具有值。如果使用决定不从CB2中选择任何值,则根本不显示CB3。


到目前为止,这就是我所做的。


1.我有主要的组合框(mcb)。

2.在mcb的Onchange事件中,显示CB1和CB2。 CB1有值,CB2没有。

3.在CB1的OnChange中,CB2被填充。


多数民众赞成。现在我希望CB3在其中显示值,具体取决于用户在CB2中选择的用户和用户。


任何人都可以帮忙吗? :)


谢谢!

Trupti

Hello all,

I have a situation and I''d appreciate it if any of you could help me. I am not sure if this is js or html but here goes. I have a main combo box (mcb) which I''m displaying some values.

Based on what the user chooses, 2 combo boxes should be displayed on same page. The first combo box (CB1), should be filled with some values. The second, (CB2) however, should get loaded on basis of what is chosen in CB1. UNtil then, CB2 should be empty (but visible). When user chooses a value in CB1, and then CB2, a 3rd combo box, CB3 should be displayed. CB3 will have values already, based on what is chosen in CB2. If use decides not to select any value from CB2, CB3 is not displayed at all.

Until now, this is what I have done.

1. I have the main combo box (mcb).
2. In Onchange event of mcb, CB1 and CB2 get displayed. CB1 has values, CB2 does not.
3. In OnChange of CB1, CB2 gets populated.

Thats all. Now I want a CB3 to be displayed with values in it, depending on if and what the user chooses in CB2.

Can anyone help? :)

Thanks!
Trupti

推荐答案

您使用的是AJAX还是普通的ASP。 NET的东西?
are you using AJAX or normal ASP.NET stuff?


都没有。只需js,html和php。
Neither. Just js, html and php.


将数据视图绑定到您的CB3 ..

每当用户更改CB2的值时,使用DataView.RowFilter对其进行过滤。 。

并再次将其绑定到CB3 ..
bind dataview to your CB3..
use DataView.RowFilter to filter it each time, when user change value of CB2..
and bind it to CB3 again..


这篇关于显示/隐藏和更新组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆