Exemplo n.º 1
0
        protected void grid_ActionCellCustomCommand(Object sender, ActionCellCustomCommandEventArgs e)
        {
            var lb = e.ActionCellControl.FindControl("lbAction") as LinkButton;

            if (String.Compare(lb.Text, "note", true) == 0)
            {
            }
        }
Exemplo n.º 2
0
        public void OnActionCellCustomCommand(ActionCellCustomCommandEventArgs args)
        {
            EventHandler <ActionCellCustomCommandEventArgs> handler = ActionCellCustomCommand;

            if (handler != null)
            {
                handler(this, args);
            }
        }
Exemplo n.º 3
0
        protected void lbAction_Command(Object sender, CommandEventArgs e)
        {
            var linkButton    = (sender as LinkButton);
            var bodyRowIndex  = Int32.Parse(linkButton.CommandArgument);
            var actionType    = GridExtensions.Parse(linkButton.CommandName);
            var dataCellsList = CellsList.Body.GetDataCellsList(bodyRowIndex) as DataCellsList;

            if (actionType == ActionTypes.Edit)
            {
                HandleEditCommand(linkButton, bodyRowIndex);
            }
            else if (actionType == ActionTypes.Delete)
            {
                var args = new RowDeletedEventArgs(bodyRowIndex, dataCellsList);

                CellsList.Body.GridControl.OnRowDeleted(args);
            }
            else if (actionType == ActionTypes.Custom)
            {
                var args = new ActionCellCustomCommandEventArgs(bodyRowIndex, this);

                CellsList.Body.GridControl.OnActionCellCustomCommand(args);
            }
        }