如何在GridView中更新特定的列 [英] how to update a particular column in gridview

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

问题描述

如何更新gridview中的特定列

how to update a particular column in gridview

推荐答案

参考:
在ASP.NET中编辑单个GridView单元格 [ ^ ]

类似的讨论:
使单个列在网格视图中可编辑 [ CodeProject答案 [
Refer:
Edit Individual GridView Cells in ASP.NET[^]

Similar discussion:
Making a Single Column Editable in Grid View[^]

And CodeProject Answers[^]




用这个.

Hi,

use this.

int columnIndex=2;
foreach(GridViewRow row in GridView1.Rows)
{
    row.Cells[columnIndex].Text="New Value";
}

//This will update all rows of column 2 with "New Value".



希望它能起作用.



Hope it works.


您的问题需要更多的阐述.根据您的问题,我只能 HERE [ ^ ]获得大量选项.
Your question needs more elaboration. Based on your question I can only redirect you HERE[^] for vast options.


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

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