如何将序列号放在数据gridview的行标题上 [英] how to put serial numbers on row headers of data gridview
问题描述
您好,
i希望将行号作为序列号放在Windows应用程序中每行数据gridview的行标题上我在这个函数中使用了这样的代码
我写的函数
int count = 0;
foreach(来自donorview.Rows的DataGridViewRow行)
{
// //donorview.Rows[row.Index].HeaderCell.Value =(row.Index + 1).ToString();
count ++;
row.HeaderCell.Value = count.ToString();
}
但是这些数字没有显示在gridview的行标题上可能是什么问题?
请重播我
谢谢和问候
Ginnas
check这个帖子
如何使DataGridView具有行标题序列号和统计列值 [ ^ 一>
Hello,
i wanted to put row numbers as serial numbers on row header of each rows of data gridview in windows application for that i have used the code like this
inside a function i wrote
int count = 0;
foreach (DataGridViewRow row in donorview.Rows)
{
// //donorview.Rows[row.Index].HeaderCell.Value = (row.Index + 1).ToString();
count++;
row.HeaderCell.Value = count.ToString();
}
but the numbers are not displaying on the row headers of the gridview what could be the problem?
please replay me
Thanks&Regards
Ginnas
check this thread
How to Make a DataGridView it has Row-Header Serial Number and Statistics Column Value [^]
这篇关于如何将序列号放在数据gridview的行标题上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!