Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > MultiColumn ComboBox > SelectedValue Returns Nothing

Not answered SelectedValue Returns Nothing

Feed from this thread
  • JustinWong Intermediate avatar

    Posted on Mar 30, 2010 (permalink)

    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

    Reply

  • JustinWong Intermediate avatar

    Posted on Mar 30, 2010 (permalink)

    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

    Reply

  • Deyan Deyan admin's avatar

    Posted on Apr 2, 2010 (permalink)

    Hello Justin,

     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.

    Reply

  • Arul avatar

    Posted on Aug 26, 2011 (permalink)

    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.

    Reply

  • Svett Svett admin's avatar

    Posted on Aug 31, 2011 (permalink)

    Hi Arul,

    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 >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > MultiColumn ComboBox > SelectedValue Returns Nothing
Related resources for "SelectedValue Returns Nothing"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]