.net - Viewing Row number in GridView Control C# -


i want know if possible add row number each row in gridview control in boxes shown in image.

enter image description here

is possible or not?

you can use code

foreach (datagridviewrow r in  datagridview1.rows) {     datagridview1.rows[r.index].headercell.value = (r.index + 1).tostring(); } 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -