如何在asp.net中的Gridview中仅编辑单个列 [英] How to Edit only single column in Gridview in asp.net

查看:192
本文介绍了如何在asp.net中的Gridview中仅编辑单个列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨..

我只想将gridview中的单个列与gridview中的Command字段绑定.

Hi..

i want to bind only single column in gridview with Command field in gridview..

string strSQLconnection = "Data Source=nikunj-29A21F8B;Initial Catalog=HRProcess;Integrated Security=True";
           SqlConnection sqlConnection = new SqlConnection(strSQLconnection);
           SqlCommand sqlCommand = new SqlCommand("select * from HRProcess_Detail where UDetailID=''" + uid + "''", sqlConnection);
           sqlConnection.Open();
           SqlDataAdapter adapter = new SqlDataAdapter(sqlCommand);
           DataSet ds = new DataSet();
           adapter.Fill(ds);
           GridView1.DataSource = ds;
           GridView1.DataBind();



从上面的代码中,我绑定了所有字段,但是我只想从中编辑1个字段..

谢谢&问候,
Nikunj Chheda.



from above code i''m binding all the fields but i want to edit only 1 field from this..

Thanks & Regards,
Nikunj Chheda.

推荐答案

在这里您要走

在ASP.NET中的Gridview中编辑单元格 [在ASP.NET中编辑各个GridView单元格 [
Here you go

Edit Cells in Gridview in ASP.NET [^]
Edit Individual GridView Cells in ASP.NET[^]


这篇关于如何在asp.net中的Gridview中仅编辑单个列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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