Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
805
Simulating SelectedItem?
posted

We are using UltraCombo as a multi-column combobox replacing the WF built-in version. I've muddled my way through some of the required changes, but I'm stumped by SelectedItem.

Under WF SelectedItem returns the row from the datasource, which I then cast back into the class in the array that's feeding it - in this case, an object called Fund. SelectedRow returns an UltraGridRow instead, and since there's no casting for this into our Fund object, replacing SelectedItem with SelectedRow fails - so this extremely common bit of code doesn't work:

aFund = _view.Funds.SelectedRow

Is there a way to do this with writing lots of casting methods? Maybe I use SelectedRow's index and then use that into the datasource?

 

Maury