/// <summary> /// Custom sorting /// </summary> /// <param name="e"></param> protected override void OnSorting(GridViewSortEventArgs e) { SetCustomSortExpression(e); GridViewSortEventHandler handler = (GridViewSortEventHandler)base.Events["Sorting"]; if (handler != null) { handler(this, e); } }
/// <summary> /// Initializes a new instance of <see cref="ZentityDataGridView"/>. /// </summary> protected ZentityDataGridView() : base() { AutoGenerateColumns = false; this.AllowPaging = true; this.ShowFooter = this.ShowHeader = true; DataKeyNames = new string[] { _idColumn }; PageIndexChanging += new GridViewPageEventHandler(GridView_PageIndexChanging); Sorting += new GridViewSortEventHandler(GridView_Sorting); RowDataBound += new GridViewRowEventHandler(GridView_RowDataBound); this.DataBound += new EventHandler(ZentityDataGridView_DataBound); }