富文本框 [英] Richtextbox

查看:197
本文介绍了富文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在表中有一个描述"列和一个类别代码"列.我已经在列表框中填充了描述".我想要的是,当我单击列表框中的描述"时,richtextbox应该填充描述"值的相关"categoryCode",并且该值应该在richtext框中拉出.

两列都在同一表中.
例如:我的富文本框应显示为..

CategoryCode = ??????????

请给我一些想法.

I have a "Description" column and a "categoryCode" column in a table. I have populated the "Description" in a listbox. What I want is that when I click the "Description" in listbox, the richtextbox should populate the related "categoryCode" of the "Description" value and the value should be pulled in richtext box.

Both columns are in same table.
Ex: My rich text box should appear as..

CategoryCode = ??????????

Please give me some ideas.

推荐答案

很简单,您可以获得所选的描述

并制作一个
just simeply you can get the selected description

and make a
query="select catergorycode from table where description="+ listBox1.SelectedItem.ToString();

;
然后执行命令;然后在那之后:

;
then execute the command ; then after that :

while(dr.read()){

richtextbox.text=dr[0].tostring();
}


这篇关于富文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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