如何从网格视图中获取标签中的数据? [英] How Can I Get The Data In A Label From A Grid View?

查看:93
本文介绍了如何从网格视图中获取标签中的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过网格视图中的视图状态保存了它,没有得到它的线索..我需要的是我放置一个文本框,如果我给它4,那么标签显示4索引的值。 br />
我知道它可能会使用选定的索引..但不能再有RND :(,.. Plz帮助......

I have saved it through view state in grid view ,Didn't having a clue getting it..what i need is that i place a textbox and if I give it 4,so the labels shows value on 4 index.
I know it might used selected index..but cann't have further RND :(,..Plz help...

推荐答案

你使用过:你的label = datagridview.Rows [你的列索引] .Cells [cell] .value ??
did you use: your label= datagridview.Rows[your column index].Cells[cell].value ??


'For t As Integer = 0 To GridView1.Rows.Count - 1

'Label1.Text = GridView1.Rows(t).Cells(v1).Text



'Next





这是我的第一个解决方案........:)
'For t As Integer = 0 To GridView1.Rows.Count - 1
' Label1.Text = GridView1.Rows(t).Cells(v1).Text

'Next


here is my first solution........ :)


这篇关于如何从网格视图中获取标签中的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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