helppppppppppppp11111111111111111111111

Posted by Rimjhim4 under ASP.NET on 4/2/2012 | Points: 10 | Views : 765 | Status : [Member] | Replies : 2
Now ,I make a project(C# WinForm), WIt need a DataGridView control, and the DataGridView control must display Row-Header Serial Number on the left side ...........
Up to today, I can't make it out ,Can you Help me?
Thank you very much!




Responses

Posted by: Naraayanan on: 4/2/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
just try this .It may be useful
private void dataGridView1_RowValidated(object sender, DataGridViewCellEventArgs e)

{
DataGridView gridView = sender as DataGridView;

if (null != gridView)
{
if (e.RowIndex == 0)
{
gridView.Rows[e.RowIndex].HeaderCell.Value = "1";
}
else
{
int rowcnt = gridView.Rows.Count - 2 +1;
gridView.Rows[e.RowIndex].HeaderCell.Value = Convert.ToString(rowcnt);
}

}

}


Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Rimjhim4, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rimjhim4 on: 4/3/2012 [Member] Starter | Points: 25

Up
0
Down
where is row validate event in gridview????

Rimjhim4, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response