12-02-2011، 12:55 PM
کد:
foreach (DataGridViewRow row in dataGridView1.Rows)
{
if (row.IsNewRow) continue;
row.HeaderCell.Value = (row.Index+1).ToString();
}
//dataGridView1.AutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders);
aGrid1.RowHeadersWidth = 60;