Checkbox DropDownList ListControl

23 posts, 1 answers
  1. vbocanegra
    vbocanegra avatar
    19 posts
    Member since:
    Mar 2006

    Posted 05 Aug 2010 Link to this post

    Hi people,
    Is posible create to CheckBox "DropDownList or ListControl". Any sample?

    Thanks

    Victor
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 06 Aug 2010 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. vbocanegra
    vbocanegra avatar
    19 posts
    Member since:
    Mar 2006

    Posted 06 Aug 2010 Link to this post

    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!
  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 09 Aug 2010 Link to this post

    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
  6. vbocanegra
    vbocanegra avatar
    19 posts
    Member since:
    Mar 2006

    Posted 09 Aug 2010 Link to this post

    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
  7. Answer
    Peter
    Admin
    Peter avatar
    1148 posts

    Posted 10 Aug 2010 Link to this post

    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
  8. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 18 Aug 2010 Link to this post

    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
  9. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 23 Aug 2010 Link to this post

    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
  10. Jason Parrish
    Jason Parrish avatar
    87 posts
    Member since:
    Sep 2009

    Posted 09 Nov 2010 Link to this post

    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.
  11. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 10 Nov 2010 Link to this post

    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
  12. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 12 Nov 2010 Link to this post

    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
  13. Aglahel
    Aglahel avatar
    1 posts
    Member since:
    Feb 2011

    Posted 18 Feb 2011 Link to this post

    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?
  14. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 21 Feb 2011 Link to this post

    Hello Aglahel,

    Check the following help articles:

    Kind regards,
    Steve
    the Telerik team
  15. Michael
    Michael avatar
    3 posts
    Member since:
    Mar 2011

    Posted 28 Mar 2011 Link to this post

    (Deleted)
  16. Michael
    Michael avatar
    3 posts
    Member since:
    Mar 2011

    Posted 28 Mar 2011 Link to this post

    How do I approach the select all for the check boxes inside the combo box? I want to have a "Select All" option.

    Thanks!
  17. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 31 Mar 2011 Link to this post

    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
  18. subbarayan
    subbarayan avatar
    20 posts
    Member since:
    Oct 2008

    Posted 19 May 2011 Link to this post

    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.
  19. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 25 May 2011 Link to this post

    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.
  20. subbarayan
    subbarayan avatar
    20 posts
    Member since:
    Oct 2008

    Posted 27 May 2011 Link to this post

    thanks.

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

     
  21. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 01 Jun 2011 Link to this post

    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.
  22. Erich
    Erich avatar
    1 posts
    Member since:
    Jun 2011

    Posted 14 Jun 2011 Link to this post

    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);
  23. Denis Cilliers
    Denis Cilliers avatar
    62 posts
    Member since:
    Jan 2004

    Posted 01 Oct 2012 Link to this post

    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

  24. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 05 Oct 2012 Link to this post

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