This is a migrated thread and some comments may be shown as answers.

RadCombobox with check

7 Answers 276 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ricardo
Top achievements
Rank 1
Ricardo asked on 18 Dec 2008, 02:51 PM
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

7 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 19 Dec 2008, 05:48 PM
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.
0
Ricardo
Top achievements
Rank 1
answered on 05 Jan 2009, 03:41 PM
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



0
Martin Vasilev
Telerik team
answered on 06 Jan 2009, 05:42 PM
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.
0
Ricardo
Top achievements
Rank 1
answered on 06 Jan 2009, 06:04 PM
Hi again...

now gave me this error...

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

Best regards
Ricardo Antunes
0
Martin Vasilev
Telerik team
answered on 08 Jan 2009, 06:20 PM
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.
0
mike_edu
Top achievements
Rank 1
answered on 25 Mar 2010, 08:25 PM
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
0
Nikolay
Telerik team
answered on 01 Apr 2010, 08:40 AM
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.
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
Ricardo
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Ricardo
Top achievements
Rank 1
mike_edu
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or