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();
}