How to filter gridview with multiple checkboxes?

Discussion in 'Visual Basic .Net' started by DN Admin, Apr 20, 2012.

  1. DN Admin

    Staff Member

    Joined:
    Aug 7, 2010
    Location:
    Joliet, IL U.S.A.
    Hi!<br/>
    <br/>
    How do I filter my DataGridView with multiple checkboxes names?
    I want to filter in which region the suppliers are located. ex. RegionTable.Regionrow.
    <br/>
    And I have 4 different regions(checkboxes text name) I want to filter with. Compatible to use multiple choices in filtering.<br/>
    So. Checking 2 of the 4 regions and pushing the filter button should filter the gridview after checked checkboxes.<br/>
    I have tried different methods for 4 hours and search the net but can't find any good method.<br/>
    <br/>
    This is what i have so far: (only able to filter with one checkbox)<br/>
    If RegionEuropeCheckBox.Checked = True Then<br/>
    Try<br/>
    Me.SupplierTableAdapter.FillByRegion(Me.TraficatorSet.Supplier, RegionEuropeCheckBox.Text)<br/>
    Catch ex As System.Exception<br/>
    System.Windows.Forms.MessageBox.Show(ex.Message)<br/>
    End Try<br/>
    End If<br/>
    <br/>
    Thanks in Advance!<br/>
    Roberth M

    View the full article
     
    #1

Share This Page