在网格视图中将值设置为标签 [英] Setting Value To the Label in grid view
本文介绍了在网格视图中将值设置为标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我面临一个小问题,我必须从datareader设置放置在网格视图中的label的值.但是缺少了一些东西.
任何人都可以让我知道该怎么做吗?
我将其类型转换为标签,然后从数据读取器中设置标签的文本.
但是出了点问题.
Hi,
i m facing a little problem that i have to set the value of label placed in grid view from the datareader. But something is missing .
Can anyone pls let me know how to do this?
I am type casting it into label and then setting label''s text from data reader.
but something is wrong.
推荐答案
我认为您想要的只是将标签的文本设置为从数据读取器获得的文本?您只需执行
即可访问标签的文本
I think what you want is to just set a label''s text to what you get from your data reader? You access label''s text by just doing
labelName.Text = "Whatever you got from your reader here"
这对您有帮助吗?还是我误读了您的问题?
Does this help or am I misreading your question?
这篇关于在网格视图中将值设置为标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文