Aspose.Cells.GridWeb.Examples.CSharp.Miscellaneous.PivotTable.CreateCustomPivotTable.btnSubmit2_Click C# (CSharp) 메소드

btnSubmit2_Click() 보호된 메소드

protected btnSubmit2_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
리턴 void
        protected void btnSubmit2_Click(object sender, EventArgs e)
        {
            // Initialize Data
            InitData();

            GridWorksheet sheet = GridWeb1.WorkSheets["PivotTable Report"];

            GridPivotTable pivotTable = sheet.PivotTables[0];

            // Sets field SortOrder property determining the order of the field item
            pivotTable.Fields("Employee").IsAscendSort = (ddlEmployee.SelectedItem.Value.Equals("Asc"));
            pivotTable.Fields("Country").IsAscendSort = (ddlCountry.SelectedItem.Value.Equals("Asc"));
            
            // Paints PivotTable report
            pivotTable.CalculateData();
        }