首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

c# 2003 datagrid怎么获取当前格子列头文本

2012-02-07 
c# 2003 datagrid如何获取当前格子列头文本?生疏了。c#2003datagrid如何获取当前格子列头文本?dgrd_workert

c# 2003 datagrid如何获取当前格子列头文本?
生疏了。c#   2003   datagrid如何获取当前格子列头文本?
dgrd_workertime.CurrentCell

[解决办法]
我用的 2005 ,2003 中差不多,模仿一下:

int colIndex = this.dataGridView1.CurrentCell.ColumnIndex;

DataGridViewColumn col = this.dataGridView1.Columns[colIndex];

Console.WriteLine(string.Format( "Column Name: {0}\tIndex: {1} ", col.Name, col.Index));

热点排行