0
votes

Hello There is a table in Gridview2 on my form which is named List. When I run the project that I want to do, I click on any of the listed names in the Gridview2 and I want the Gridview1 to come to that area. By the way Surname is the common area on both grids. How can you help me to be delighted!

string Surname = Convert.ToString(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "SURNAME"));

enter image description here

1
I don't see any SQL. Please consider removing the SQL tag or elaborate your question to include any SQL that plays a role in this. - sticky bit
Dear sticky..I am extracting the table data from the sql database. - Burak Turhan
Yes. But... you probably run that program on a computer running Windows <version> using an Intel <model number> CPU with a <brand> monitor and <brand> keyboard in your house in <city> in <country>. But you didn't tag these, because they are not relevant for the question. I think you get my point. ;) - sticky bit
I've added an image, maybe give some idea! :) - Burak Turhan
If I understand correctly, you want a system wherein you can click/double-click on a name in grid 1 and then display all the data filtered by that name in grid #2? BTW, using surname to perform this operation is probably a bad choice, as many different people can have the same surname. It would be a better choice to use a unique identifier for each pilot and then a foreign key relationship to their flights. - Brendon

1 Answers

0
votes
string Surname = gridView1.GetRowCellValue(gridView2.FocusedRowHandle, "SURNAME").ToString();