Ejemplo n.º 1
0
        /// <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);
            }
        }
Ejemplo n.º 2
0
        /// <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);