Question Datagridview, Duplicate Cell Values [non-unique to unique by appending]

ashbeats

New member
Joined
Jan 10, 2009
Messages
1
Programming Experience
Beginner
Hiya,

I'm using the datagridview. This is the sample data:

VB.NET:
+---------+------------+
| f_name  | l_name     |
+---------+------------+
| John    | Hagan      |
| Peter   | Hagan      |
| Peter   | Champion   |
| Paul    | Simon      |
| Arthur  | Hoopla     |
| Carl    | Hagan      |
| Kim     | Hunter     |
| Roger   | Lewis      |
+---------+------------+

How do I parse through the grid to rename the duplicate values in a particular
column (in this example it's the l_name field) into such a format?

VB.NET:
+---------+------------+
| f_name  | l_name     |
+---------+------------+
| John    | Hagan(1)   |
| Peter   | Hagan(2)   |
| Peter   | Champion   |
| Paul    | Simon      |
| Arthur  | Hoopla     |
| Carl    | Hagan(3)   |
| Kim     | Hunter     |
| Roger   | Lewis      |
+---------+------------+


I would appreciate any help. Thanks :)
 
Last edited:

Latest posts

Back
Top