Button Click
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

    Button Click


    I have a button on click event I have the following 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.
            End If
    At runtime, when I select the items from th edropdownlist combo box and click the button the datagridview is not populated.. Why?


  2. #2
    Join Date
    Aug 2009
    NW USA

    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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a Codeguru.com survey!

HTML5 Development Center