Thursday, October 26, 2017

In C# WinForms Applications, how to display the row number in the row header in a DataGridView?

We could use the RowPostPaint event of DataGridView control. 

Suppose grid is named as dgvUserDetails

Delegate:




Code:




Result:



Source: https://stackoverflow.com/questions/25697917/how-to-display-serial-number-in-datagridview

No comments:

Post a Comment