CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Button Click

  1. #1
    Join Date
    Feb 2009
    Posts
    192

    Button Click

    Hi,

    I have a button on click event I have the following code;

    Code:
    Private Sub BtnChk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnChk.Click
    
            If CmbTruckTyp.SelectedItem.ToString = "Daf" And cmbDafModels.SelectedItem.ToString = "Daf cf85" And CmbCategory.SelectedItem.ToString = "Filters" Then
                'TODO: This line of code loads data into the 'ProductDetails.QryProductDetails' table. You can move, or remove it, as needed.
                Me.QryProductDetailsTableAdapter.Fill(Me.ProductDetails.QryProductDetails)
            Else
    
            End If
    At runtime, when I select the items from th edropdownlist combo box and click the button the datagridview is not populated.. Why?

    Thanks

  2. #2
    Join Date
    Aug 2009
    Location
    NW USA
    Posts
    173

    Re: Button Click

    Put a break on the "If" statement and look at all the different values for the combobox control properties (very interesting). I usually just use the cb.text property unless the selected item is different than the text.

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

Featured