public ExtendedDataGridView()
     : base()
 {
     KeyDown += new KeyEventHandler(ExtendedDataGridView_KeyDown);
     CellContextMenuStripNeeded += new DataGridViewCellContextMenuStripNeededEventHandler(ExtendedDataGridView_CellContextMenuStripNeeded);
     CellFormatting             += new DataGridViewCellFormattingEventHandler(ExtendedDataGridView_CellFormatting);
 }
Beispiel #2
0
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// datagridviewcellcontextmenustripneededeventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this DataGridViewCellContextMenuStripNeededEventHandler datagridviewcellcontextmenustripneededeventhandler, Object sender, DataGridViewCellContextMenuStripNeededEventArgs e, AsyncCallback callback)
        {
            if (datagridviewcellcontextmenustripneededeventhandler == null)
            {
                throw new ArgumentNullException("datagridviewcellcontextmenustripneededeventhandler");
            }

            return(datagridviewcellcontextmenustripneededeventhandler.BeginInvoke(sender, e, callback, null));
        }