Click here to Skip to main content
15,881,870 members
Articles / Web Development / ASP.NET

A Filter Dialog for a DataGridView

Rate me:
Please Sign up or sign in to vote.
4.04/5 (9 votes)
28 Sep 20067 min read 113.8K   4.5K   75  
This is a dialog window that allows filtering a DataGridView. It can build filters with any depth of parentheses.
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class StringExpression
    Inherits GenericExpression

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.TextBox1 = New System.Windows.Forms.TextBox
        Me.SuspendLayout()
        '
        'OperandsList
        '
        Me.OperandsList.Items.AddRange(New Object() {"contains", "does not contain", "begins with", "ends with", "matches", "does not match"})
        '
        'TextBox1
        '
        Me.TextBox1.Location = New System.Drawing.Point(132, 3)
        Me.TextBox1.Name = "TextBox1"
        Me.TextBox1.Size = New System.Drawing.Size(110, 20)
        Me.TextBox1.TabIndex = 1
        '
        'StringExpression
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.Controls.Add(Me.TextBox1)
        Me.Name = "StringExpression"
        Me.Size = New System.Drawing.Size(247, 27)
        Me.Controls.SetChildIndex(Me.TextBox1, 0)
        Me.Controls.SetChildIndex(Me.OperandsList, 0)
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Friend WithEvents TextBox1 As System.Windows.Forms.TextBox

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions