// ExStart:BeforeColumnFilter
        protected void GridWeb1_BeforeColumnFilter(object sender, RowColumnEventArgs e)
        {
            // Display the column index and filter applied
            string msg = "[Column Index]: " + (e.Num) + ", [Filter Value]: " + e.Argument;

            Label1.Text = msg;
        }
Exemplo n.º 2
0
        // ExEnd:BeforeColumnFilter

        // ExStart:AfterColumnFilter
        protected void GridWeb1_AfterColumnFilter(object sender, RowColumnEventArgs e)
        {
            string hidden  = "";
            int    headrow = 0;
            int    maxrow  = GridWeb1.WorkSheets[0].Cells.MaxRow;
            int    count   = 0;

            // Iterate all worksheet rows to find out filtered rows
            for (int i = headrow + 1; i <= maxrow; i++)
            {
                if (GridWeb1.WorkSheets[0].Cells.Rows[i].Hidden)
                {
                    hidden += "-" + (i + 1);
                }
                else
                {
                    count++;
                }
            }

            // Display hidden rows and visible rows count
            string msg = "[Hidden Rows]: " + hidden + " [Visible Rows]: " + count;

            Label1.Text = msg;
        }
        // ExEnd:BeforeColumnFilter

        // ExStart:AfterColumnFilter
        protected void GridWeb1_AfterColumnFilter(object sender, RowColumnEventArgs e)
        {
            string hidden = "";
            int headrow = 0;
            int maxrow = GridWeb1.WorkSheets[0].Cells.MaxRow;
            int count = 0;

            // Iterate all worksheet rows to find out filtered rows
            for (int i = headrow + 1; i <= maxrow; i++)
            {
                if (GridWeb1.WorkSheets[0].Cells.Rows[i].Hidden)
                {
                    hidden += "-" + (i + 1);
                }
                else
                {
                    count++;
                }
            }

            // Display hidden rows and visible rows count 
            string msg = "[Hidden Rows]: " + hidden + " [Visible Rows]: " + count;
            Label1.Text = msg;
        }
 // ExStart:BeforeColumnFilter
 protected void GridWeb1_BeforeColumnFilter(object sender, RowColumnEventArgs e)
 {
     // Display the column index and filter applied
     string msg = "[Column Index]: " + (e.Num) + ", [Filter Value]: " + e.Argument;
     Label1.Text = msg;
 }