/// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// datagridviewcellvalueeventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this DataGridViewCellValueEventHandler datagridviewcellvalueeventhandler, Object sender, DataGridViewCellValueEventArgs e, AsyncCallback callback)
        {
            if (datagridviewcellvalueeventhandler == null)
            {
                throw new ArgumentNullException("datagridviewcellvalueeventhandler");
            }

            return(datagridviewcellvalueeventhandler.BeginInvoke(sender, e, callback, null));
        }
Exemplo n.º 2
0
 public void SetGridCellValueNeededEvent(DataGridViewCellValueEventHandler handler)
 {
     DataGrid.CellValueNeeded += handler;
 }