GrapeCity MultiRow Windows Forms Documentation
FilteringTextBoxCell Constructor
Example 


Initializes a new instance of the FilteringTextBoxCell class.
Syntax
Public Function New()
Dim instance As New FilteringTextBoxCell()
public FilteringTextBoxCell()
Example
Type "abc" in the header row cell to filter the value.
GrapeCity.Win.MultiRow.FilteringTextBoxCell filterCell1 = new GrapeCity.Win.MultiRow.FilteringTextBoxCell();
filterCell1.FilteringCellName = "text1"; 
//Target cell is "text1" which is in the Row section.
filterCell1.Location = new Point(35, 0);
filterCell1.Style.BackColor = System.Drawing.Color.Red;

GrapeCity.Win.MultiRow.FilteringTextBoxCell filterCell2 = new GrapeCity.Win.MultiRow.FilteringTextBoxCell();
filterCell2.FilteringCellIndex = 1; 
//Target cell index is 1 which is in the Row section.
filterCell2.Location = new Point(115, 0);
filterCell2.Style.BackColor = SystemColors.Info;

GrapeCity.Win.MultiRow.ColumnHeaderSection section = new GrapeCity.Win.MultiRow.ColumnHeaderSection();
section.Height = 20;
section.Cells.AddRange(new GrapeCity.Win.MultiRow.Cell[] { filterCell1, filterCell2 });
section.ReadOnly = false;
section.Selectable = true;

GrapeCity.Win.MultiRow.TextBoxCell text1 = new GrapeCity.Win.MultiRow.TextBoxCell();
text1.Name = "text1";
//This cell is filtered by FilteringTextBoxCell in ColumnHeaderSection.
GrapeCity.Win.MultiRow.TextBoxCell text2 = new GrapeCity.Win.MultiRow.TextBoxCell();

GrapeCity.Win.MultiRow.Template template1 = GrapeCity.Win.MultiRow.Template.CreateGridTemplate(new GrapeCity.Win.MultiRow.Cell[] { text1, text2 }, 160, GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.ColumnHeader | GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeader | GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeaderAutoNumber);
template1.ColumnHeaders.Add(section);
gcMultiRow1.Template = template1;
gcMultiRow1.RowCount = 3;
gcMultiRow1[0, 0].Value = "abc";
Dim filterCell1 As New GrapeCity.Win.MultiRow.FilteringTextBoxCell()
filterCell1.FilteringCellName = "text1"
'Target cell is "text1" which is in the Row section.
filterCell1.Location = New Point(35, 0)
filterCell1.Style.BackColor = System.Drawing.Color.Red

Dim filterCell2 As New GrapeCity.Win.MultiRow.FilteringTextBoxCell()
filterCell2.FilteringCellIndex = 1
'Target cell index is 1 which is in the Row section.
filterCell2.Location = New Point(115, 0)
filterCell2.Style.BackColor = SystemColors.Info

Dim section As New GrapeCity.Win.MultiRow.ColumnHeaderSection()
section.Height = 20
section.Cells.AddRange(New GrapeCity.Win.MultiRow.Cell() {filterCell1, filterCell2})
section.ReadOnly = False
section.Selectable = True

Dim text1 As New GrapeCity.Win.MultiRow.TextBoxCell()
text1.Name = "text1"
'This cell is filtered by FilteringTextBoxCell in ColumnHeaderSection.
Dim text2 As New GrapeCity.Win.MultiRow.TextBoxCell()

Dim template1 As GrapeCity.Win.MultiRow.Template = GrapeCity.Win.MultiRow.Template.CreateGridTemplate(New GrapeCity.Win.MultiRow.Cell() {text1, text2}, 160, GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.ColumnHeader Or GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeader Or GrapeCity.Win.MultiRow.AutoGenerateGridTemplateStyles.RowHeaderAutoNumber)
template1.ColumnHeaders.Add(section)
GcMultiRow1.Template = template1
GcMultiRow1.RowCount = 3
GcMultiRow1(0, 0).Value = "abc"
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

FilteringTextBoxCell Class
FilteringTextBoxCell Members

 

 


Copyright © GrapeCity, inc. All rights reserved.