RadCombobox with check

8 posts, 0 answers
  1. Ricardo
    Ricardo avatar
    3 posts
    Member since:
    Dec 2008

    Posted 18 Dec 2008 Link to this post

    Hi,

    I follow this code: http://www.telerik.com/support/kb/winforms/combobox/implementing-checkbox-items-in-radcombobox.aspx

    and i could fill the combo well.

    But now i cant know if one item is checked or not..
    This line gives me the content of the item: MItem= RadComboBox1.Items(i).Text
    but i cant know if its check or not. How can i know that?

    Best regards
    Ricardo Antunes
  2. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 19 Dec 2008 Link to this post

    Hello Ricardo,

    Thank you for the question.

    To see which items are checked add the IsChecked property to the RadCustomComboBoxItem. Please, find a simple example application as attachment to this message.

    Do not hesitate to contact me again if you need additional assistance.

    Regards,
    Martin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ricardo
    Ricardo avatar
    3 posts
    Member since:
    Dec 2008

    Posted 05 Jan 2009 Link to this post

    Hi again,

    In the example you gave , the piece of code that i need is this:

    ((this.radComboBox1.Items[i] as RadCustomComboBoxItem).IsChecked)

    Im using Visual Basic 2008, and for some reason i cant get to the right sintaxe. Can you please give me the correct sintaxe for VB 2008?

    Best regards,
    Ricardo Antunes



  5. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 06 Jan 2009 Link to this post

    Hi Ricardo,

    Thank you for getting back to me.

    The same code piece in VB.Net is:
    (TryCast(Me.radComboBox1.Items(i), RadCustomComboBoxItem)).IsChecked 

    Feel free to use our codechanger.com site for easy code conversion between c# and VB.Net in the future.

    Write me back if you need additional assistance.

    Best wishes,
    Martin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Ricardo
    Ricardo avatar
    3 posts
    Member since:
    Dec 2008

    Posted 06 Jan 2009 Link to this post

    Hi again...

    now gave me this error...

    Error    4    'IsChecked' is not a member of 'PrevisaoVendas.frmEncomendasFornecedores.RadCustomComboBoxItem'.    

    Best regards
    Ricardo Antunes
  7. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 08 Jan 2009 Link to this post

    Hi Ricardo,

    Thank you for writing.

    You have to implement IsChecked property in the RadCustomCheckBoxItem class. Please, find attached the same example in VB.Net.

    If you have other questions, do not hesitate to contact me again.

    Kind regards,
    Martin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. mike_edu
    mike_edu avatar
    3 posts
    Member since:
    Nov 2006

    Posted 25 Mar 2010 Link to this post

    hello, good example for what I need, but I have a detail as you can add to the text item and a value, and when you select a check or item of value I selected item
  9. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 01 Apr 2010 Link to this post

    Hello mike_edu,

    If I have understood you correctly, you want to have a data-bound checked combobox. In this case, please refer to the sample project attached. The key aspect of this project is the ItemDataBound event where the necessary RadComboBox customizations are applied. Please note that this is just a sample implementation and it may require some development from your side depending on the specific scenario that you have.

    Greetings,
    Nikolay
    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready