Dataview Filter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mayiko
    New Member
    • Aug 2007
    • 7

    Dataview Filter

    I am try to filter the DataGrid based on user input. I have a text box and a combo box. One contains the column and one contains the value.

    Code:
    Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click
            Dim strFilter As String
            Dim FilterFor As String
    
            strFilter = cmbSearchBy.Text
            FilterFor = txtSearchFor.Text
    
            InfoBindingSource.Filter = (strFilter = Filterfor)
    
        End Sub
    When I hit the Search button it seems to apply the filter, but it doesn't leave any in the view. For Example, if I put artist in cmbSearchBy and Ryan in txtSearchFor, it does not leave those entries in the dataview.

    Thanks in advnace for the help.
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    u r talking abt VB.net or asp.net. If asp.net then, whenever a button is hit, the page Reloads itself, u will have to check the "ISPostBack " and in page load event...

    REgards
    Veena

    Comment

    • Mayiko
      New Member
      • Aug 2007
      • 7

      #3
      I am using vb.net. I have never used asp.net

      Comment

      • Mayiko
        New Member
        • Aug 2007
        • 7

        #4
        Can anyone help? I would really appreciate it.

        Comment

        Working...