从gridview获取数据并在文本框中显示 [英] get data from gridview and show in textbox

查看:77
本文介绍了从gridview获取数据并在文本框中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

im在gridview中有数据,因为我有一个按钮,如果我单击该按钮,则应在文本框中显示该特定ID的数据,以便我们可以在数据库plz中进行编辑和更新.

im having datas in gridview in that i have one button if i click that button the datas of that particular id should be shown in textbox there we can edit and update in database plz help me.

推荐答案


试试这个
hi ,
try this
protected void gh1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
  {
      txt1.Text = gh1.Rows[e.NewSelectedIndex].Cells[2].Text;
  }


最好的问候
米特瓦里(M.Mitwalli)


Best Regards
M.Mitwalli


这篇关于从gridview获取数据并在文本框中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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