从组合框中选择一个包含字典值的值 [英] Selecting a value from combobox that contains dictionary values

查看:57
本文介绍了从组合框中选择一个包含字典值的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天

我已经使用字典从数据库中的值读取到组合框.我想从组合框中选择特定的值

我已经写了下面的代码,但是它不起作用


Good day

I have read my values from a database to a combobox using a dictionary. I want to select a specefic value from a combobox

I have written the follwing code, but its not working


         if (cmbRplStatus.DisplayMember == "2")
                        {
                           Do something                        
}



该代码有什么问题?

谢谢



Whats wrong with this code?

Thanks

推荐答案

您的问题不是很清楚.您是否在谈论 SelectedIndex [ ^ ]属性?
Your question is not very clear; are you talking about the SelectedIndex[^] property?


这篇关于从组合框中选择一个包含字典值的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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