Hello, friends,
In our c#.net app, we need Infragistics combo box to display a collection of user defined class, say UserInfoCollection for a user defined class UserInfo, like the following;
this.cmbUser.DataSource = userInfoCollection;
After a user selects a row, we need to get the selected user information in a UserInfo class. (Of course, we might be able to go to each cell in the selected row, and reconstruct a UserInfo class, but this does not sound the right way)
How can we do this? Thanks a lot!
You can use ultraCombo.SelectedRow to get the Row, then use the ListObject property of the row to get the underlying object from the data source.
thanks!
mjoshi said: I have a similar problem like above. I am binding my datasource to the ultracombo control. At the time of saving the value in my table I use ultracombo.value property to get the values of the selectedrow. Now I need to set the selectedrow runtime with the saved value in my table. I am used to selectedtext and selectedindex property of winforms combo, but cant get the idea how to set the selectedrow in ultracombo. Can anybody help? I would appreciate if elaborated with example and code.
I have a similar problem like above. I am binding my datasource to the ultracombo control. At the time of saving the value in my table I use ultracombo.value property to get the values of the selectedrow. Now I need to set the selectedrow runtime with the saved value in my table. I am used to selectedtext and selectedindex property of winforms combo, but cant get the idea how to set the selectedrow in ultracombo. Can anybody help? I would appreciate if elaborated with example and code.
If you set valuemember property then you can use
ultraCombo.Value = SavedValue;
for winforms combo you can set
winformCombo.selectedValue = SavedValue;
I'm not sure what you are asking.You can get or set the SelectedRow property on the UltraCombo control.