Spread Windows Forms 11.0 Product Documentation
Determining Which Header Row Displays the Indicators
Spread Windows Forms 11.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.

Using Code

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.

Example

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
See Also