如何在标签中显示多个列 [英] How to Display multiple columns in a label

查看:76
本文介绍了如何在标签中显示多个列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!


我的案例:



i已创建标签

i在SQL Server 2000中有一个表(Empinfo)用于员工信息

我的查询="选择Firstname,来自Empinfo的姓氏>

我的连接好了!

i连接并显示datagridveiw中两列的值也没关系完成

我的问题

但我想显示该标签中的两列..

解决方案

hiiiiiiii

可以解释一下你真的想要。你想在你的网格的一列显示你的表的两个字段的值。这就是你想要的吗?


我想要

想要在我的页面中的一个标签中显示表格的两个字段的值。


i已经完成了但是我想给出一些没有做任何想法的空间


表示

我有一张桌子(empinfo)

有三列

firstName |中间名|姓氏| emp id

sara |艾哈迈德|吉拉尼| 1

wahaj |阿里| khan | 2



这种类型的表

现在我有一个标签控件,我想显示(名字姓氏)在那个标签上(sara Gilani)


i希望你理解


你从数据库中检索数据。当你这样做时,它存储在一些对象中。使用该Object设置Label的Text属性。


为了更好地解释我在这里得到的内容,请发布您正在使用的代码从中检索数据数据库中。

Hi to all !

MY Case:


i have created a label
i had a table(Empinfo) for Employee information in SQL server 2000
my Query ="Select Firstname,lastname from Empinfo"
my connection ok!
i get connected and display the values of both the columns in the datagridveiw its ok too and done

My Problem
But i want to display the both the column in that label..

解决方案

hiiiiiiii
Can pls explain what u actually want.You want to display values of two fields of your table in one column of your grid.Is it this that u want?


i want
want to display values of two fields of your table in one Label in my page .

i had done it but i want to give space that is being not done any idea

mean
I had a table (empinfo)
had three columns

firstName | Middle Name|Last name|emp id
sara |Ahmed | Gilani | 1
wahaj |ali | khan |2



this type of table
now i had a label control and i want to display (firstname Lastname ) in that label (sara Gilani)

i hope you understand


You retrieve the data from the database. When you do this it''s stored in some Object. Use that Object to set the Text property of the Label.

For me to better explain what I''m getting at here please post the code you are using to retrieve the data from the database.


这篇关于如何在标签中显示多个列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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