Пример #1
0
        public virtual void OnRowClick(GridViewRowClickEventArgs e)
        {
            this.SelectedIndex = e.NewSelectedIndex;
            EventHandler <GridViewRowClickEventArgs> rowClickHandler = (EventHandler <GridViewRowClickEventArgs>)base.Events[GridView.EventRowClick];

            if (rowClickHandler != null)
            {
                rowClickHandler(this, e);
            }
        }
Пример #2
0
        protected override void RaisePostBackEvent(string eventArgument)
        {
            int index = eventArgument.IndexOf('$');

            if (index >= 0)
            {
                string commandName = eventArgument.Substring(0, index);
                string commandArg  = eventArgument.Substring(index + 1);
                switch (commandName)
                {
                case "rc":
                    int                       rowIndex = Int32.Parse(commandArg);
                    ASP.GridViewRow           row      = base.Rows[rowIndex];
                    GridViewRowClickEventArgs args     = new GridViewRowClickEventArgs(row, commandName, commandArg);
                    this.OnRowClick(args);
                    break;

                default:
                    base.RaisePostBackEvent(eventArgument);
                    break;
                }
            }
        }
Пример #3
0
 public virtual void OnRowClick(GridViewRowClickEventArgs e) {
     this.SelectedIndex = e.NewSelectedIndex;
     EventHandler<GridViewRowClickEventArgs> rowClickHandler = (EventHandler<GridViewRowClickEventArgs>)base.Events[GridView.EventRowClick];
     if (rowClickHandler != null)
         rowClickHandler(this, e);
 }
Пример #4
0
        protected override void RaisePostBackEvent(string eventArgument) {
            int index = eventArgument.IndexOf('$');
            if (index >= 0) {
                string commandName = eventArgument.Substring(0, index);
                string commandArg = eventArgument.Substring(index + 1);
                switch (commandName) {
                    case "rc":
                        int rowIndex = Int32.Parse(commandArg);
                        ASP.GridViewRow row = base.Rows[rowIndex];
                        GridViewRowClickEventArgs args = new GridViewRowClickEventArgs(row, commandName, commandArg);
                        this.OnRowClick(args);
                        break;

                    default:
                        base.RaisePostBackEvent(eventArgument);
                        break;
                }
            }
        }