评估下拉列表C#中的值 [英] Evaluate values in dropdownlist C#

查看:68
本文介绍了评估下拉列表C#中的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Everyone



我有3个下拉列表:ddl,ddl2,ddl3。

它包含的值如ddl1:A1,A2, A3

ddl2:B1,B2,B3

ddl3:C1,C2,C3



我想要用户选择值A1,B1,C1。

如果用户选择A1,B1,C3,则应显示错误,说明用户应在任何其他组合之前选择A1,B1,C1。



任何人都有这方面的解决方案。

我希望用c#来完成。



我尝试过:



找不到与上述情况有关的任何内容。

试图在这里和那里结合解决方案

但是不能成功。











找不到任何解决方案。

Hello Everyone

I have 3 dropdownlist : ddl,ddl2,ddl3.
It contains values like ddl1 :A1,A2,A3
ddl2:B1,B2,B3
ddl3:C1,C2,C3

I want the user to select values as A1,B1,C1.
In case if the user selects A1,B1,C3 it should display an error stating the user should select A1,B1,C1 before any other combinations.

Do any one have solutions for this.
I want this to be done using c#.

What I have tried:

Could not find anything related to the above condition.
Tried to combine the solutions here and there
but could not succeed.





Not found any solutions.

推荐答案

首先阅读: ComboBox.SelectedIndexChanged事件(System.Windows.Forms) [ ^ ]



现在检查第三个Drop Down的选定索引更改事件,无论3个值是A1,B1,C1还是。
Read it first : ComboBox.SelectedIndexChanged Event (System.Windows.Forms)[^]

Now check on the third Drop Down's selected index change event whether the 3 values are A1,B1,C1 or not.


这篇关于评估下拉列表C#中的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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