GrapeCity MultiRow Windows Forms Documentation
HeaderDropDownList Constructor(String,Boolean,Boolean)
Example 


The cell name of the corresponding cells. The filter and sort items work in the cells with the specified name.
A bool value that indicates whether to add the default filter items to the list.
A bool value that indicates whether to add the default sort items to the list.
Initializes a new instance of the HeaderDropDownList class with default items.
Syntax
Public Function New( _
   ByVal cellName As String, _
   ByVal autoAddFilterItems As Boolean, _
   ByVal autoAddSortItems As Boolean _
)
Dim cellName As String
Dim autoAddFilterItems As Boolean
Dim autoAddSortItems As Boolean
 
Dim instance As New HeaderDropDownList(cellName, autoAddFilterItems, autoAddSortItems)
public HeaderDropDownList( 
   string cellName,
   bool autoAddFilterItems,
   bool autoAddSortItems
)

Parameters

cellName
The cell name of the corresponding cells. The filter and sort items work in the cells with the specified name.
autoAddFilterItems
A bool value that indicates whether to add the default filter items to the list.
autoAddSortItems
A bool value that indicates whether to add the default sort items to the list.
Remarks
autoAddFilterItems and autoAddSortItems parameters allow you to add default items to the list. autoAddFilterItems will add DropDownShowAllFilterItem, DropDownBlanksFilterItem, DropDownNonBlanksFilterItem and DropDownAutoFilterItem. autoAddSortItems will add a DropDownSortItem for System.Windows.Forms.SortOrder.Ascending and another DropDownSortItem for System.Windows.Forms.SortOrder.Descending. In addition, a DropDownSeparatorItem is used to separate the filter and sort items.
Example
The following code example shows how to create a drop-down list for a column header cell to allow the user to sort or filter. This code example is part of a larger example provided for the DropDownList property.
void setFirstColumnDropDownListButton_Click(object sender, EventArgs e)
        {
            // Get first column header cell.
            ColumnHeaderCell columnHeaderCell = this.gcMultiRow1.ColumnHeaders[0][0] as ColumnHeaderCell;

            // Create a drop down list with some default down down items.
            columnHeaderCell.DropDownList = new HeaderDropDownList(0, true, true);
        }
Private Sub setFirstColumnDropDownListButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles setFirstColumnDropDownListButton.Click
        ' Get first column header cell.
        Dim columnHeaderCell As ColumnHeaderCell = TryCast(Me.gcMultiRow1.ColumnHeaders(0)(0), ColumnHeaderCell)

        ' Create a drop down list with some default down down items.
        columnHeaderCell.DropDownList = New HeaderDropDownList(0, True, True)
    End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

HeaderDropDownList Class
HeaderDropDownList Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.