如何查看grvFile.CurrentRow.Cells["xx"] 中的项?

bkkkkk 2009-08-14 10:32:39
grvFile.CurrentRow.Cells["I_FromDesc"]

如何查看grvFile.CurrentRow.Cells["xx"] 中的项?xx有哪些?

用程序列出来
...全文
88 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
wang520d 2009-08-14
  • 打赏
  • 举报
回复

string CELLS = "";
foreach (DataGridViewColumn dgc in dgv.Columns)
{
CELLS += dgc.DataPropertyName.ToString() + ",";
}
dancingbit 2009-08-14
  • 打赏
  • 举报
回复
[Quote=引用楼主 bkkkkk 的回复:]
grvFile.CurrentRow.Cells["I_FromDesc"]

如何查看grvFile.CurrentRow.Cells["xx"] 中的项?xx有哪些?

用程序列出来
[/Quote]
xx是数据源中的列名,要取相应Cell的值的话,在后面加上.Value。
成都慢生活 2009-08-14
  • 打赏
  • 举报
回复
Just for Guess

foreach(object item in grvFile.CurrentRow.Cells)
{
debug.writeline(item.Name)
}

I don't know what the data type in the collection
wang520d 2009-08-14
  • 打赏
  • 举报
回复
?数据源有哪些列就有哪些吧。。

110,566

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧