View Single Post
  #17 (permalink)  
Old May 12th, 2004, 03:10 PM
Ron Howerton Ron Howerton is offline
Friend of Wrox
Points: 2,876, Level: 22
Points: 2,876, Level: 22 Points: 2,876, Level: 22 Points: 2,876, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

I was referring to:

combobox1.SelectedIndex = 1

I would expect a property ending in the word "Index" to expect a numeric value (or perhaps a string ala accessing tables by name from a dataset), but not a datarowview (which seemed to be the error the above statement generated with the ciomplex dataset). I mentioned it obliquely in reference to katsarosj's suggested solution - I could find the index of the value I was searching for, but was unable to set SelectedIndex due to this bizarre datarowview problem.

Since I've got this code working as desired now, it's mostly a matter of curiosity rather than any pressing need to understand. In the future, I plan to bind only simple datasets and avoid the problem altogether.