SelectedValue Returns Nothing

5 posts, 0 answers
  1. JustinWong
    JustinWong avatar
    147 posts
    Member since:
    Mar 2007

    Posted 30 Mar 2010 Link to this post

    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!

  2. JustinWong
    JustinWong avatar
    147 posts
    Member since:
    Mar 2007

    Posted 30 Mar 2010 Link to this post

    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?

  3. Deyan
    Deyan avatar
    2147 posts

    Posted 02 Apr 2010 Link to this post

    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.

    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.
  4. Arul
    Arul avatar
    2 posts
    Member since:
    Feb 2011

    Posted 26 Aug 2011 Link to this post

    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.
  5. Svett
    Svett avatar
    728 posts

    Posted 31 Aug 2011 Link to this post

    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.

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

Back to Top