private void fileview_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{ MessageBox.Show(fileview.Rows.Count.ToString()); }总是不停的弹出提示
{ MessageBox.Show(fileview.Rows.Count.ToString()); }总是不停的弹出提示
解决方案 »
- 高手进!用ReportView打印rdlc报表的问题。
- 求executescalar返回值超过一行一列解决方案
- 数组去重。。求解。。
- 有关树节点!
- 做类似于这样一个网站(http://www.glvchina.com/chinese/main.php)需要多少Money?
- 小弟有个问题很急很急,请高手快点进来帮忙,回答出来先送40分!拜托
- 定义了两个string数组,如何得到数组首地址
- c#这种界面如何做
- cs操作类里面如何应用Server.MapPath?
- 属性定义语法问题
- DataGridViewCheckBoxColumn绑定int列的问题
- ExecuteNonQuery();并非所有的字段都已绑定
所以再次触发RowPostPaint,所以又弹警告框。。无穷无尽。
我是想在datagridview里想加一列序号,才用这个事件的
还是别人告诉我这样做的
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
foreach (DataGridViewRow row in dataGridView1.Rows)
{
row.Cells[0].Value = row.Index+1;
}
}