GrapeCity.Win.MultiRow Namespace : DropDownCustomFilterItem Class |
<ToolboxBitmapAttribute()> Public Class DropDownCustomFilterItem Inherits DropDownItem Implements INamedObject
Dim instance As DropDownCustomFilterItem
[ToolboxBitmap()] public class DropDownCustomFilterItem : DropDownItem, INamedObject
The filter operation is applied to cells specified by HeaderDropDownList.CellIndex or HeaderDropDownList.CellName, and between HeaderDropDownList.StartRow and HeaderDropDownList.EndRow.
The DropDownCustomFilterItem is used to define the filter rule manually. You can create a DropDownCustomFilterItem with a special FilterValue, and then add the item to the HeaderDropDownList. If the item is clicked, the relative cell whose FormattedValue is the same as the filter value is displayed, and other cells are hidden.
The DropDownAutoFilterItem can generate DropDownCustomFilterItem objects automatically with default text. If you want to change the text, image, or other properties of the generated item, use the DropDownItemNeeded event to create the item. You can add several DropDownCustomFilterItem objects into the HeaderDropDownList directly instead of using DropDownAutoFilterItem.
The default filter rule is that the object System.Object.Equals(System.Object,System.Object) is equal to the FilterValue. You can define a new rule by overriding the Check or Equals methods.
void setFourthColumnDropDownListButton_Click(object sender, EventArgs e) { // Create a header drop down list without default down down items. HeaderDropDownList headerDropDownList = new HeaderDropDownList(); DropDownItemCollection dropDownItemCollection = headerDropDownList.Items; // Initialize drop down items manually. // Add show all item. dropDownItemCollection.Add(new DropDownShowAllFilterItem()); // custom range item. dropDownItemCollection.Add(new PopupFilterItem()); // Get second column header cell. ColumnHeaderCell columnHeaderCell = this.gcMultiRow1.ColumnHeaders[0][3] as ColumnHeaderCell; columnHeaderCell.DropDownList = headerDropDownList; }
Private Sub setFourthColumnDropDownListButton_Click(ByVal sender As Object, ByVal e As EventArgs) Handles setFourthColumnDropDownListButton.Click ' Create a header drop down list without default down down items. Dim headerDropDownList As New HeaderDropDownList() Dim dropDownItemCollection As DropDownItemCollection = headerDropDownList.Items ' Initialize drop down items manually. ' Add show all item. dropDownItemCollection.Add(New DropDownShowAllFilterItem()) ' custom range item. dropDownItemCollection.Add(New PopupFilterItem()) ' Get second column header cell. Dim columnHeaderCell As ColumnHeaderCell = TryCast(Me.gcMultiRow1.ColumnHeaders(0)(3), ColumnHeaderCell) columnHeaderCell.DropDownList = headerDropDownList End Sub
System.Object
GrapeCity.Win.MultiRow.DropDownItem
GrapeCity.Win.MultiRow.DropDownCustomFilterItem
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