Get value of checked item in CheckedListBox

by Kareem Allam 18. September 2011 18:31

 after bind CheckedListBox with data you can get value of checked items


For i As Integer = 0 To CheckedListBox1.CheckedItems.Count - 1
                    Dim XDRV As DataRowView = CType(CheckedListBox1.CheckedItems(i), DataRowView)
                    Dim XDR As DataRow = XDRV.Row
                    Dim XDisplayMember As String = XDR(CheckedListBox1.DisplayMember).ToString()
                    Dim XValueMember As String = XDR(CheckedListBox1.ValueMember).ToString()
                    MsgBox("DisplayMember : " & XDisplayMember & "   - ValueMember : " & XValueMember )
Next

 now you can use the value or Display of checked items in CheckedListBox from the 2 variables XDisplayMemberXValueMember in the loop

 

hope to be useful ,,, 


If you enjoyed this post, make sure you subscribe to my RSS feed!

Comments (8) -

tuxedo jacket
tuxedo jacket United States
10/1/2011 1:04:28 AM #

Greetings!! This is a real great site.

Barbara
Barbara
10/8/2011 12:30:30 PM #

Thank for amazing post! I really enjoyed reading it.  I will make sure to bookmark your blog and will definitely keep returning at a later time.  Carry on great work. Have a great day.

facebook for business
facebook for business United States
10/13/2011 12:51:46 AM #

I cant believe the quantity of wonderful info you've on your weblog. I've learned a lot from it. Will probably be coming back soon…

tom
tom
10/15/2011 12:44:06 PM #

Hi this is a Awesome info i like this thanks

Fred
Fred United States
10/17/2011 7:30:07 PM #

Merci pour ce post.

decorative Window films
decorative Window films United States
10/18/2011 9:37:56 AM #

Good blog! I truly love how it is nice on my eyes it is. I am wondering how I could be notified whenever a new post has been made. I have subscribed to your RSS feed which may do the trick? Have a great day!

Web Directory
Web Directory United States
11/2/2011 11:11:20 AM #

What a nice publish. I actually really like reading these types or posts. I can?t wait to determine what others need to say.

location riad Marrakech
location riad Marrakech France
11/9/2011 1:37:15 AM #

I bear recently started a blog, the instruction you furnish on this website has helped me greatly. Acknowledges for many of your phase & process. “It is no habituate dictum, ‘We are doing our excel.’ You bear got to score in doing what is integral.” by Sir Winston Churchill.

About EgDev.com

If you would like to find value services with excellent quality and cost effectiveness and with a focus on speed , Just Follow

 Egypt Development Freelance Team.

Month List

Page List