Results 1 to 3 of 3

Thread: checked list box issue

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2010
    Posts
    93

    checked list box issue

    i have a checked list box and a text box i am using the code below to enter the item that is checked in to the textbox and it is working fine.How ever the problem comes when a user checks an item and then uncheks it the code is belowliz help


    Code:
    If txtSQL.Text = "" Then
                txtSQL.Text = chlTableCols.GetItemText(chlTableCols.SelectedItem.ToString)
            Else
                txtSQL.Text = txtSQL.Text.ToString + ("," + chlTableCols.GetItemText(chlTableCols.SelectedItem))
            End If

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: checked list box issue

    Quote Originally Posted by tendaimare View Post
    How ever the problem comes when a user checks an item and then uncheks it
    What problem comes?

  3. #3
    Addicted Member vb_ftw's Avatar
    Join Date
    Dec 2010
    Posts
    139

    Re: checked list box issue

    in the checkbox checkchanged event u can add a code for the checkbox that is on the event of checkchanged the textbox should be filled with the selected item from<wherever> and on uncheck it should set the textbox to ""

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width