富文本框

编程入门 行业动态 更新时间:2024-10-25 05:13:48
本文介绍了富文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在表中有一个描述"列和一个类别代码"列.我已经在列表框中填充了描述".我想要的是,当我单击列表框中的描述"时,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(); }

更多推荐

富文本框

本文发布于:2023-06-09 04:11:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/594968.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文本框

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!