在Windows窗体应用程序中编辑组合框 [英] Editing comboboxes inWindows form application

查看:86
本文介绍了在Windows窗体应用程序中编辑组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在asp.net中你好
下面的代码适用于下拉列表ddScreanNameClass





ddScreanNameClass。 SelectedIndex = ddScreanNameClass.Items.IndexOf(ddScreanNameClass.Items.FindByValue(3));



我需要等效代码在Windows窗体申请组合框

解决方案

最好问一下有人可以告诉我怎么样在Windows窗体中执行此操作?而不是你问的;否则(至少在英语中)你可以遇到要求和粗鲁。



只是说...... :-)



无论如何,这应该有效:

 ddScreanNameClass.SelectedItem =   3\" ; 


Hi in asp.net the following code is works fine for dropdown list "ddScreanNameClass"


ddScreanNameClass.SelectedIndex = ddScreanNameClass.Items.IndexOf(ddScreanNameClass.Items.FindByValue("3"));

I need equivalent code in windows form application for comboboxes

解决方案

It probably would have been better to ask "Could someone please show me how to do this in Windows Forms?" rather than what you asked; otherwise (in English at least) you can come across as demanding and rude.

Just saying... :-)

Anyway, this should work:

ddScreanNameClass.SelectedItem = "3";


这篇关于在Windows窗体应用程序中编辑组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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