title: DataView Sort - how to when column names are unknown
body: <p>I need advice on how to go about a problem I have with sorting a DataView in C#.</p>
  
  <p>I need to add a sort property to my DataView because I later need it when I call a Find on the DataView (which needs to have a sort property specified in order to work). I need the Find in order to properly map a DataRow to a DataGridViewRow. I currently just use the row index to map to the DataGridViewRow, but this won't work in all cases if the user physically moves rows, or changes the sort order in the DataGridView (UI) because then the ids no longer match-up/map.</p>
  
  <p>When I create the DataView, I load in a DataTable to pass in for creation. This DataTable can be of any form, I do not know what the DataTable contains for columns and rows. Therefore, I cannot create a sort if I don't know any column names to sort by.</p>
  
  <p>I was thinking of just taking the first column name (column[0]) - no matter what it is and using that to sort. But this seems kinda sketchy, no?</p>
  
  <p>My question is, is there a better way to determine what to sort my DataView by when column names are unknown? </p>
  
  <p>Thanks!</p>