DropDownList & Checkboxes

4 posts, 0 answers
  1. Denis Cilliers
    Denis Cilliers avatar
    62 posts
    Member since:
    Jan 2004

    Posted 01 Oct 2012 Link to this post

    Requirements
    RadControls version 2012.2.912.40
    .NET version 4.0
    Visual Studio version 2010
    programming language VB.Net
      
    PROJECT DESCRIPTION
    I tried to reproduce the demo sample that generates the Check-box in the drop-down list.  In the Demo applications it is called
    Dropdown & List/Creating New Items

    The VB.Net code seems to be a missing event details as there are no handles int he code to copy for the events below
    Private Sub ItemDataBound(ByVal sender As Object, ByVal args As ListItemDataBoundEventArgs)
    Private Sub ItemDataBinding(ByVal sender As Object, ByVal args As ListItemDataBindingEventArgs)  
    Private Sub CreatingVisualListItem(ByVal sender As Object, ByVal args As CreatingVisualListItemEventArgs)
    I added some handles, but dont seem to get the Dropdown to generate properly

    Private Sub ItemDataBound(ByVal sender As Object, ByVal args As ListItemDataBoundEventArgs) Handles RadDropDownList1.ItemDataBound, RadListControl1.ItemDataBound
    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

    I tried to modify the code but could not get  the the  check-box in the drop-down item ,while it does in the List-box

    There seems to be a missing event, and in the demo code?

    Thanks 

    Denis
  2. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 09 Oct 2012 Link to this post

    Hello Denis,

    Thank you for contacting us.

    We strive to keep the structure of the code of our VB examples the same as the structure of the C# ones. However, the Handles clause in the VB languages behaves different (it adds the handler at an earlier stage of the initialization) and in some cases this leads to issues in the examples. For this reason in some examples we use the AddHandler clause which has a C# equivalent.

    In your case, the CreatingVisualListItem handler was added only to the list control and the drop down was populated with its default visual items. I am sending you back the modified project. All event handlers are added in the form's constructor using the AddHandler clause.

    Offtopic, please note that you have posted this thread in our CodeLibrary section, which purpose is for the community to share solutions that they find interesting. Please do not use this section for posting questions.

    Hope you find this useful. Feel free to ask if you have any additional questions.

    All the best,
    Ivan Todorov
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Andrew
    Andrew avatar
    125 posts
    Member since:
    Sep 2008

    Posted 22 Nov 2012 Link to this post

    hi I am trying to implement a RadListControl with checkboxes and you please explain how to direct me to a sample c# app?
  5. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 23 Nov 2012 Link to this post

    Hello Andrew,

    Thank you for your question.

    There is an example of this scenario in our Examples application which is installed along with our products. VB and C# of the source code is available in the application. Additionally, a Visual Studio solution of the examples is also available in your installation directory.

    Should you have any other questions, do not hesitate to ask.

    Greetings,
    Ivan Todorov
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Back to Top