[enter image description here](https://i.stack.imgur.com/ZRDlD.png)I have 2 different datagrid, the first DG1 is my item list and DG2 is the item queues for purchased items. My goal is whenever i click an item in DG2, DG1 is also selected with the same name or id. I want to ignore the index because my item queue is different from item list order.

```
private void dgItems_CellClick(object sender, DataGridViewCellEventArgs e)
    {

        int rowindex = dgItems.Rows[e.RowIndex].Index;
        int columnindex = dgItems.Columns[e.ColumnIndex].Index;

        dgItemList.Rows[rowindex].Cells[columnindex].Selected = true;
    }

```
['https://Stackoverflow.com/questions/52738149', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/7725975/']
You can always create models:

```
export class User {
 id: string,
 username: string,
 first_name: string,
 last_name: string,
 email: string,
 is_active: boolean,
 is_superuser: boolean
}

export class UserDetails{
 user:User;
 role:string;
}

```

Then:

```
// Assume you have received the json in string form in
'resultlist' variable
let dataList = <Array<UserDetails>>JSON.parse(resultlist);

```

Or:

```
// Assume you have received the json in object form in 'resultlist' variable
let dataList = <Array<UserDetails>>resultlist;

```
`this.userData["role"] = this.user.role` should be `this.userData["role"] = this.role`