This is a migrated thread and some comments may be shown as answers.
DropDownList & Checkboxes
3 Answers 121 Views
This is a migrated thread and some comments may be shown as answers.
Denis Cilliers
Top achievements
Rank 1
Denis Cilliers asked on 01 Oct 2012, 11:28 AM
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

3 Answers, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 09 Oct 2012, 05:59 AM
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 >>
0
Andrew
Top achievements
Rank 1
Veteran
answered on 22 Nov 2012, 03:14 PM
hi I am trying to implement a RadListControl with checkboxes and you please explain how to direct me to a sample c# app?
0
Ivan Todorov
Telerik team
answered on 23 Nov 2012, 09:26 AM
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.
Asked by
Denis Cilliers
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Andrew
Top achievements
Rank 1
Veteran
Share this question
or