如何使用数据绑定组合框填充文本框 [英] How do I fill textbox using databound combobox

查看:82
本文介绍了如何使用数据绑定组合框填充文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个数据绑定comobobox - 我想创建一个订单,以便选择任何项目 - 它的颜色是一个不同的单元格显示在文本框中。



I.e.我从checkedlistbox中选择'Toy house' - 这是使用数据库项目创建的

因此textbox1应该显示颜色单元格中的'Blue'。此表单中没有datagridview表。



我想制作动态公式

有人可以帮忙吗?



我尝试了什么:



我不太确定从哪里开始?

I have created a databound comobobox - I want to create a order so that what ever item is selected - the Colour of it which is is a different cell is displayed in a textbox.

I.e. i select 'Toy house' from the checkedlistbox - which was created using databounditems
therefore the textbox1 should display 'Blue' which is in the colour cell. There no datagridview table in this form.

I want to make a dynamic formula also
Can anyone help?

What I have tried:

I'm not too sure where to start?

推荐答案

给定要显示的值不是文本框中的值。无论数据来自何处,我都会使用StringDictionary来创建查找,并根据它设置文本。
Given the value you want to show is not the value in the textbox. where-ever the data comes from, I'd use a StringDictionary to create a lookup, and set the text based on that.


这篇关于如何使用数据绑定组合框填充文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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