public void SetPage() { try { int pageNo; if (int.TryParse(txtCurrentPage.Value, out pageNo) == true && pageNo <= PageCount && pageNo > 0) { owner.CurrentPage = int.Parse(txtCurrentPage.Value) - 1; owner.Rebind(); } else { txtCurrentPage.Value = "" + (PagingManager.CurrentPageIndex + 1); } } catch (IndException ex) { ControlHierarchyManager.ReportError(ex); return; } catch (Exception ex) { ControlHierarchyManager.ReportError(new IndException(ex)); return; } }
/// <summary> /// Event handler for the click event of Clear Filter button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void clearFilterButton_Click(object sender, ImageClickEventArgs e) { try { //For each data bound and displayed column in the grid, clear its filter foreach (GridColumn c in this.Owner.Columns) { IndGridBoundColumn col = c as IndGridBoundColumn; if (col != null && col.Display) { col.CurrentFilterFunction = GridKnownFunction.NoFilter; col.CurrentFilterValue = String.Empty; } } IndCatGrid parentGrid = (IndCatGrid)this.Owner.OwnerGrid; parentGrid.IndFilterExpression = String.Empty; parentGrid.IndFilterItem = new IndFilterItem(); parentGrid.Rebind(); } catch (IndException ex) { ControlHierarchyManager.ReportError(ex); return; } catch (Exception ex) { ControlHierarchyManager.ReportError(new IndException(ex)); return; } }