protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
FpSpread1.ActiveSheetView.ColumnHeader.RowCount = 3;
FpSpread1.ActiveSheetView.ColumnHeader.Columns[1].AutoFilterIndex = 1;
FpSpread1.ActiveSheetView.ColumnHeader.Columns[0].AutoFilterIndex = 2;
Random rnd = new Random();
for (int row = 0; row < FpSpread1.ActiveSheetView.RowCount; row++)
{
for (int col = 0; col < FpSpread1.ActiveSheetView.ColumnCount; col++)
{
FpSpread1.ActiveSheetView.Cells[row, col].Text = rnd.Next(100).ToString();
}
}
FarPoint.Web.Spread.FilterColumnDefinition fcd0 = new FarPoint.Web.Spread.FilterColumnDefinition(0,
FarPoint.Web.Spread.FilterListBehavior.SortByMostOccurrences | FarPoint.Web.Spread.FilterListBehavior.Default);
FarPoint.Web.Spread.FilterColumnDefinition fcd1 = new FarPoint.Web.Spread.FilterColumnDefinition(1,
FarPoint.Web.Spread.FilterListBehavior.SortByMostOccurrences | FarPoint.Web.Spread.FilterListBehavior.Default);
FarPoint.Web.Spread.HideRowFilter hf = new FarPoint.Web.Spread.HideRowFilter(FpSpread1.ActiveSheetView);
hf.AddColumn(fcd0);
hf.AddColumn(fcd1);
FpSpread1.ActiveSheetView.RowFilter = hf;
}