JustinWong
Top achievements
Rank 1
JustinWong
asked on 30 Mar 2010, 11:25 PM
Have a MultiColumn ComboBox bound to a dataset. The binding is okay, I can see all the items in the dropdown.
MCC.ValueMember = "Field1"
MCC.DisplayMember = "Field2"
Note that Field1 is NOT part of any column.
So, what I want to retrieve, of course, is the value associated with "Field1" of the selected row. However, because that field is not included in any of the column, I'm having a real tough time retrieving it. MCC.SelectedValue always return nothing!!!
Please help!
Justin
MCC.ValueMember = "Field1"
MCC.DisplayMember = "Field2"
Note that Field1 is NOT part of any column.
So, what I want to retrieve, of course, is the value associated with "Field1" of the selected row. However, because that field is not included in any of the column, I'm having a real tough time retrieving it. MCC.SelectedValue always return nothing!!!
Please help!
Justin
4 Answers, 1 is accepted
0
JustinWong
Top achievements
Rank 1
answered on 31 Mar 2010, 12:06 AM
Okay. Nevermind. I got it. Have to get the DataRowView from the selected row, then locate the field value. This is kind'a convoluted though. One would expect SelectedValue to return the value of the ValueMember of the selected row. . . .
Another problem I'm now having: Is there a FindIndexByValue equavalent in the MultiColumn ComboBox?
Again, my ValueMember is "Field1". When the form loads, I want the ComboBox to automatically select the row where Field1 = 10. How can I implement that?
Justin
Another problem I'm now having: Is there a FindIndexByValue equavalent in the MultiColumn ComboBox?
Again, my ValueMember is "Field1". When the form loads, I want the ComboBox to automatically select the row where Field1 = 10. How can I implement that?
Justin
0
Hello Justin,
I am happy that you managed to resolve the first case.
Regarding the second case you could use the SelectedValue property to select an item based on the value of the currently chosen ValueMember column:
I hope this helps.
Do not hesitate to write back in case you need further help.
Greetings,
Deyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Thanks for contacting us and for your questions.
I am happy that you managed to resolve the first case.
Regarding the second case you could use the SelectedValue property to select an item based on the value of the currently chosen ValueMember column:
this
.radMultiColumnComboBox.SelectedValue = 10;
I hope this helps.
Do not hesitate to write back in case you need further help.
Greetings,
Deyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Arul
Top achievements
Rank 1
answered on 26 Aug 2011, 08:31 AM
Hi i have the same issue. My problem is after i loaded the MultiColumncombobox i set MultiColumncombobox.SelectedValue=90. 90 is my id field which was hidden that is index 0 position. But it is not displayed the display member in my MultiColumncombobox. If i pass other id's which is not in o index position it was display fine.
Please help me for resolve this.
Please help me for resolve this.
0
Hi Arul,
Svett
the Telerik team
I did not manage to reproduce the issue with the latest release Q2 2011 (2011.2.11.712). I recommend upgrading to the latest release. If you experience the same behavior, I would kindly ask you to open support ticket with enclosed sample project where the issue occurs. This will allow us to investigate the issue further.
Regards,Svett
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>