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

Checkbox DropDownList ListControl

22 Answers 1267 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
vbocanegra
Top achievements
Rank 2
vbocanegra asked on 05 Aug 2010, 11:14 PM
Hi people,
Is posible create to CheckBox "DropDownList or ListControl". Any sample?

Thanks

Victor

22 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 06 Aug 2010, 03:51 PM
Hello vbocanegra,

Thank you for writing.

Please refer to our demo application, installed with our tools and the examples for RadListControl and RadDropDownList in particular. You will find answers to your questions there.

Please write again if you have other questions.
 
Best wishes,
Victor
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
0
vbocanegra
Top achievements
Rank 2
answered on 06 Aug 2010, 06:33 PM
Thanks for answer.
I think that now it´s too complicated to use DropDownList. I prefer to use RadComboBox, that is easy to use.

Please need help!
0
Peter
Telerik team
answered on 09 Aug 2010, 03:29 PM
Hello vbocanegra,

Thanks for writing back.

Please, refer to the attached project that demonstrates RadCheckBox elements into RadComboBox.

I hope this project is useful.

All the best,
Peter
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
0
vbocanegra
Top achievements
Rank 2
answered on 09 Aug 2010, 06:20 PM
Thanks Peter for your answer,
My trouble is by the future of my application. The RadComboBox is a obsolete control and the only way to do that will be with RadDropDownList. Do you have any plan about simply the way add checkbox a RadDropDownList?

Thanks.

Victor
0
Accepted
Peter
Telerik team
answered on 10 Aug 2010, 04:47 PM
Hi vbocanegra,

By obsolete we mean that the controls are not visible in the Toolbox any more.
 
For examples with RadCheckBox and RadListControl and RadDropDownList please, refer to our demo application, installed with our tools. You will find working solutions there.
 
Please write again if you have other questions.

All the best,
Peter
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
0
Emanuel Varga
Top achievements
Rank 1
answered on 18 Aug 2010, 03:51 PM
Hello,

With the demo provided i have been able to make a custom control that shows checkboxes for all list elements, but the problem is that every time you click on a checkbox the dropdown closes,  is there a way of avoiding this?

Thank you,
Emanuel Varga
0
Peter
Telerik team
answered on 23 Aug 2010, 02:33 PM
Hello Emanuel Varga,

Thanks for writing.
 
Our DropDownList does not allow and does not define any logic for multiple selection. If you do some tests, you can prevent the closing by using SelectedIndexChanging and set e.Cancel to True - in this case you cannot change the selected item. So this scenario is not supported.

Please, excuse us for the inconvenience. Don't hesitate to contact us if you have other questions.

Sincerely yours,
Peter
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
0
Jason Parrish
Top achievements
Rank 1
answered on 09 Nov 2010, 11:30 PM
Is there a way to update the SelectedItems collection on the listcontrol when a checkbox is (un)checked?  In your demo, the collection count is always one.
0
Emanuel Varga
Top achievements
Rank 1
answered on 10 Nov 2010, 07:04 PM
Hello,

Sorry, by default there is no way of getting the selectedItems like this, but i would suggest creating a custom property inside the ComboBox where you can iterate trough all the items and return just the checked ones.

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga
0
Peter
Telerik team
answered on 12 Nov 2010, 04:22 PM
Hi,

Thank you for writing.

Actually, you can modify the SelectedItems collection, but we do not recommend doing so.
Please refer to the code line below:

((RadListDataItemSelectedCollection)this.radListControl1.SelectedItems).Add(this.radListControl1.Items[2]);

The preferred way is to set Selected property of RadListDataItem:
private void Form4_Load(object sender, EventArgs e)
{
this.radListControl1.SelectionMode = SelectionMode.MultiSimple;
             
this.radListControl1.Items[2].Selected = true;
this.radListControl1.Items[3].Selected = true;
}

I hope this helps.

Regards,
Peter
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
0
Aglahel
Top achievements
Rank 1
answered on 18 Feb 2011, 11:18 PM
Hello such, seeking more reporting a forum not find hope to support me, my question is this component to generate reports for ASP.NET Telerik Reporting is my question which I can use to generate reports with Windows Form?
0
Steve
Telerik team
answered on 21 Feb 2011, 09:14 AM
Hello Aglahel,

Check the following help articles:

Kind regards,
Steve
the Telerik team
0
Michael
Top achievements
Rank 1
answered on 28 Mar 2011, 02:45 PM
(Deleted)
0
Michael
Top achievements
Rank 1
answered on 28 Mar 2011, 08:12 PM
How do I approach the select all for the check boxes inside the combo box? I want to have a "Select All" option.

Thanks!
0
Peter
Telerik team
answered on 31 Mar 2011, 05:06 PM
Hello Michael.

Thank you for this question. In this case you should enumerate all Items in your RadListControl and set manually the Check-box state. Please consider the following sample:

foreach(CustomListDataItem item in radDropDownList1.Items )
{
               ((BussinessObject)item.DataBoundItem).Available = true;
}

I hope this helps.

Greetings,
Peter
the Telerik team
0
subbarayan
Top achievements
Rank 1
answered on 19 May 2011, 10:24 AM
hi,
  I am using dropdownlist with checkbok.  my problem is i want to check multiple items within a single dropdown menu.
When i am checked a item, the dropdown menu is automatically closed immediatelly.My requirement is need to open
the dropdown menu before i closed.

thanks.
0
Peter
Telerik team
answered on 25 May 2011, 05:46 AM
Hi chokkalingam,

Please, could you specify which control do you use in this case - RadDropDownList or RadMenu? This will help me to understand the issue and provide you with accurate support. 

I look forward to your reply.

All the best,
Peter
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
0
subbarayan
Top achievements
Rank 1
answered on 27 May 2011, 10:35 AM
thanks.

   I am using raddropdownlist in my application.
plz. provide a solution.

 
0
Peter
Telerik team
answered on 01 Jun 2011, 08:40 AM
Hello subbarayan,

Thank you for writing.

Before getting to your question, I would like to remind you that not providing us with the requested license information in the support thread "Master details in report" (which you can find in "Your Account"), may result in denying support services for your account. This is why, I would like to kindly ask you to provide us with the requested information, so we can update your account status and continue providing you with undisturbed support services. 

As to your question at hand, you should cancel RadDropDownList's PopupClosing event, for example:
void radDropDownList1_PopupClosing(object sender, Telerik.WinControls.UI.RadPopupClosingEventArgs args)
  {
            if (args.CloseReason == Telerik.WinControls.UI.RadPopupCloseReason.Mouse)
     {
                args.Cancel = false;
     }
}

I hope this helps.
 
Kind regards,
Peter
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
0
Erich
Top achievements
Rank 1
answered on 14 Jun 2011, 08:45 PM
I find that it is much easier to use the drop down button and loading that with checkbox elements.

RadDropDownButton dropDownButton = new RadDropDownButton(); 
RadCheckBoxElement allElement = new RadCheckBoxElement(); 
allElement .Text = "-All"; 
allElement .ToggleStateChanged += new StateChangedEventHandler (allElement _ToggleStateChanged); 
dropDownButton.Items.Add(allElement);
0
Denis Cilliers
Top achievements
Rank 1
answered on 01 Oct 2012, 11:05 AM
Any chance you can provide a updated example using a Dropdown List and not a List box.

As the question was based on a Dropdown List.

I tired to use the demo code but it does not render the checkbox in the dropdown item , while it does in the Listbox

There seems to be a missing event, and in the demo code the event handlers are not written up properly

Private Sub ItemDataBinding(ByVal sender As Object, ByVal args As ListItemDataBindingEventArgs) Handles RadDropDownList1.ItemDataBinding
 
Private Sub CreatingVisualListItem(ByVal sender As Object, ByVal args As CreatingVisualListItemEventArgs) Handles RadListControl1.CreatingVisualListItem

as the Handles section is missing for these two events

Thanks

Denis

0
Nikolay
Telerik team
answered on 05 Oct 2012, 02:36 PM
Hi Denis,

We have added the AddHandler declaration to subscribe your RadDropDownList to CreatingVisualItemEvent in the Designer file of the UserControl of the example. You need to add the following declaration to your code: 

AddHandler Me.radDropDownList1.CreatingVisualListItem, AddressOf Me.CreatingVisualListItem

You can also check the following code library article which demonstrates how you can make a multi-select RadDropDownList: http://www.telerik.com/community/code-library/winforms/dropdownlist-and-listcontrol/radmultiselectdropdownlist.aspx

I hope this helps.

All the best,
Nikolay
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
DropDownList
Asked by
vbocanegra
Top achievements
Rank 2
Answers by
Victor
Telerik team
vbocanegra
Top achievements
Rank 2
Peter
Telerik team
Emanuel Varga
Top achievements
Rank 1
Jason Parrish
Top achievements
Rank 1
Aglahel
Top achievements
Rank 1
Steve
Telerik team
Michael
Top achievements
Rank 1
subbarayan
Top achievements
Rank 1
Erich
Top achievements
Rank 1
Denis Cilliers
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or