Click here to Skip to main content
15,885,546 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.
'' FILENAME:        FilterItemGroupMenuButton
'' NAMESPACE:       PI.Dialogs.Filter
'' APPLICATION:     N/A
'' CREATED BY:      Luke Berg
'' CREATED:         8-14-06
'' REVISED BY:      Luke Berg
'' REVISED:         8-16-06
'' DESCRIPTION:     The menu button that is attached to the end of a filter group

Public Class FilterItemGroupMenuButton
    ''' <summary>
    '''  An enumeration of the items in the menu button
    ''' </summary>
    ''' <remarks></remarks>
    Public Enum Items As Integer
        AndItem = 0
        OrItem = 1
        Delete = 3
        Insert = 4
        EndItem = 6
    End Enum

    ''' <summary>
    '''  Basic Constructor
    ''' </summary>
    Public Sub New()

        ' This call is required by the Windows Form Designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        Me.Item = Items.EndItem

    End Sub

    ''' <summary>
    '''   Sets which item is selected in the button's menu
    ''' </summary>
    Public Property Item() As Items
        Get
            Return Me.SelectedIndex
        End Get
        Set(ByVal value As Items)
            Me.SelectedIndex = value
        End Set
    End Property
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