Okay so I am writting a program that is designed to make scheduling easier at the job I work at right now. Well part of the program is that there is a DB of employees and data that can be edited from the program (pretty straight forward like any program really). Anyway when the user clicks the edit employees button it brings up a new form and a datagridview is populated from an object array of data. Now my question is, I would love to allow the user to sort the array based on what tab they pick (name, ID #, ext) the only problem is when it's an unsort and they click on a row they want to edit I can use the index of that row to access the array of data and change the correct data, the problem is then when sorted the indexes of the datagridview don't match with the index of the array. So what I am asking is did Visual Studio 2010 add a method that allows me to get around this sort with method. As of now I have a chunk of code (from an older program) that scans the array with a for loop for the matching ID#, and once it finds the matching ID# it notes that as the correct index.
Does this make sense? Hopefully it does, anyway and help is appreciated, Thanks!