RadItem Collection Editor

4 posts, 0 answers
  1. jerry
    jerry avatar
    103 posts
    Member since:
    Feb 2008

    Posted 14 Jan 2010 Link to this post

    I'm using the RadItem Collection editor to add items to my combobox.  I see a place to enter the display text but where can I enter a value that I can use within c#?  I'm trying to use my combobox's SelectedValue property but it comes back as null.  Why would selectedtext come back as "" when it has been selected?

    Thank You
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 15 Jan 2010 Link to this post

    Hi jerry,

    Thank you for your questions.

    Please refer to our online documentation for the first question.

    SelectedText is only valid while RadComboBox has the focus. It corresponds to the part of the text that is selected in the text box part of RadComboBox. Just like a stand alone text box, when it loses focus, all its text is deselected, therefore you can not get the SelectedText property by clicking on another control.

    Please write again if you have other questions.

    All the best,

    Victor
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. jerry
    jerry avatar
    103 posts
    Member since:
    Feb 2008

    Posted 15 Jan 2010 Link to this post

    Victor,
    Thank you for your help. 

    I'm still a bit confused on how to set the value of a combobox item.
    Within the link you sent me it says // SelectedValue is valid only in a data bound scenario.
    I'm not binding my comboboxes to any data source just filling it in either manually or through code.  I have values I have to use since I dynamically create a string that uses the values not the text of a drop down item.  I do apologize if I'm completely missing your point.

    Thank You
    Jerry
  5. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 18 Jan 2010 Link to this post

    Hi jerry,

    Thank you for writing. You are not missing the point. If you need to set a value you can store it in the Tag property of RadComboBoxItem -- every RadElement has a Tag property. Please write again if you need further assistance.

    Greetings,
    Victor
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top