/// <summary> /// 触发RowDataBoundCell事件 /// </summary> /// <param name="gvtc"></param> protected virtual void OnRowDataBoundCell(GridViewTableCell gvtc) { RowDataBoundCellHandler handler = Events[rowDataBoundCellEventKey] as RowDataBoundCellHandler; if (handler != null) { handler(this, gvtc); } }
/// <summary> /// OnRowDataBound /// </summary> /// <param name="e">e</param> protected override void OnRowDataBound(GridViewRowEventArgs e) { DataControlRowType rowType = e.Row.RowType; for (int i = 0; i < e.Row.Cells.Count; i++) { GridViewTableCell gvtc = new GridViewTableCell(e.Row.Cells[i], i, e.Row.RowType, e.Row.RowState); OnRowDataBoundCell(gvtc); } if (rowType == DataControlRowType.DataRow) { OnRowDataBoundDataRow(e); } base.OnRowDataBound(e);