//
实现该功能花了我好多时间啊,资料查了N久 ...
![](http://ctc.qzs.qq.com/qzone/em/e178.gif)
//窗体加载时
private void FrmViewAdmin_Load(object sender, EventArgs e)
{
string[] str=new string[2];
char a='A';
for (int i = 1; i < 11;i++,a++ )
{
str[0] = i.ToString();
str[1] = a.ToString();
private void FrmViewAdmin_Load(object sender, EventArgs e)
{
string[] str=new string[2];
char a='A';
for (int i = 1; i < 11;i++,a++ )
{
str[0] = i.ToString();
str[1] = a.ToString();
//获取当前ListView行数
int row = this.listViewAdmin.Items.Count;
int row = this.listViewAdmin.Items.Count;
//向ListView插入数据
this.listViewAdmin.Items.Insert(row,new ListViewItem(str));
}
this.listViewAdmin.Items.Insert(row,new ListViewItem(str));
}
}
效果如下:
![图片](https://i-blog.csdnimg.cn/blog_migrate/06e3509ae3c2cd6c4c7ec0ea40983a2b.jpeg)