I have a need to create two DataGridView controls on a form that contain the exact same data where the left grid is programmatically populated. The requirement is that the right grid can be sorted differently than the left grid by clicking on the column headers. I'm having two issues with this:
1. Is there a way to "clone" one grid to equal another grid so the data will automatically copied to the second grid when the left grid is being populated? I tried this but it didn't work:
dataGridViewRight = dataGridViewLeft
The strange thing is, the data seems to be the same between the two grids but nothing is displayed in the right grid. Is there a way to display the data after you set one grid equal to the other grid?
2. The left grid will be constantly upgraded, it's a scoring grid. How would I handle if the data in the left grid changes and the right grid is sorted differently? I tried capturing the left grid CellChanged event but I have no idea where the cell is in the right grid.
Is there anyway to do this?