System.Web.UI.WebControls.GridView.OnBubbleEvent C# (CSharp) Method

OnBubbleEvent() protected method

protected OnBubbleEvent ( object source, EventArgs e ) : bool
source object
e EventArgs
return bool
		protected override bool OnBubbleEvent (object source, EventArgs e)
		{
			GridViewCommandEventArgs args = e as GridViewCommandEventArgs;
			if (args != null) {
				bool causesValidation = false;
				IButtonControl button = args.CommandSource as IButtonControl;
				if (button != null && button.CausesValidation) {
					Page.Validate (button.ValidationGroup);
					causesValidation = true;
				}
				OnRowCommand (args);
				string param = args.CommandArgument as string;
				if (param == null || param.Length == 0) {
					GridViewRow row = args.Row;
					if (row != null)
						param = row.RowIndex.ToString();
				}
				ProcessEvent (args.CommandName, param, causesValidation);
				return true;
			}
			return base.OnBubbleEvent (source, e);
		}