Spread Windows Forms 9.0 Product Documentation > Developer's Guide > Customizing Row or Column Interaction > Managing Filtering of Rows of User Data > Customizing Simple Filtering > Setting the Appearance of Filter Indicators > Determining Which Header Row Displays the Indicators |
If you have multiple column header rows then you can specify which row displays the filter indicators. By default they appear in the bottom column header row. You can specify which row displays the indicator by setting the AutoFilterIndex property of the ColumnHeader class.
Set the ColumnHeader class AutoFilterIndex property to the row index to display the indicator. The row index is zero based, so the first row is 0.
The following example sets the indicator to appear in the next to the bottom column header row.
C# |
Copy Code
|
---|---|
fpSpread1.ActiveSheet.Columns[1].AllowAutoFilter = true;
fpSpread1.ActiveSheet.ColumnHeaderRowCount = 3;
fpSpread1.ActiveSheet.ColumnHeader.AutoFilterIndex = 1;
|
VB |
Copy Code
|
---|---|
FpSpread1.ActiveSheet.Columns(1).AllowAutoFilter = True
FpSpread1.ActiveSheet.ColumnHeaderRowCount = 3
FpSpread1.ActiveSheet.ColumnHeader.AutoFilterIndex = 1
|