Example #1
0
		protected virtual void OnRowHeightInfoPushed (DataGridViewRowHeightInfoPushedEventArgs e)
		{
			DataGridViewRowHeightInfoPushedEventHandler eh = (DataGridViewRowHeightInfoPushedEventHandler)(Events [RowHeightInfoPushedEvent]);
			if (eh != null) eh (this, e);
		}
 /// <include file='doc\DataGridView.uex' path='docs/doc[@for="DataGridView.OnRowHeightInfoPushed"]/*' />
 protected virtual void OnRowHeightInfoPushed(DataGridViewRowHeightInfoPushedEventArgs e)
 {
     DataGridViewRowHeightInfoPushedEventHandler eh = this.Events[EVENT_DATAGRIDVIEWROWHEIGHTINFOPUSHED] as DataGridViewRowHeightInfoPushedEventHandler;
     if (eh != null && !this.dataGridViewOper[DATAGRIDVIEWOPER_inDispose] && !this.IsDisposed)
     {
         eh(this, e);
     }
 }
 private bool OnRowHeightInfoPushed(int rowIndex, int height, int minimumHeight)
 {
     Debug.Assert(rowIndex != -1);
     Debug.Assert(this.autoSizeRowsMode == DataGridViewAutoSizeRowsMode.None);
     if (this.VirtualMode || this.DataSource != null)
     {
         DataGridViewRowHeightInfoPushedEventArgs dgvrhipe = new DataGridViewRowHeightInfoPushedEventArgs(rowIndex, height, minimumHeight);
         OnRowHeightInfoPushed(dgvrhipe);
         if (dgvrhipe.Handled)
         {
             UpdateRowHeightInfoPrivate(rowIndex, false, true /*invalidInAdjustFillingColumns*/);
             return true;
         }
     }
     return false;
 }
 protected virtual void OnRowHeightInfoPushed(DataGridViewRowHeightInfoPushedEventArgs e);
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// datagridviewrowheightinfopushedeventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this DataGridViewRowHeightInfoPushedEventHandler datagridviewrowheightinfopushedeventhandler, Object sender, DataGridViewRowHeightInfoPushedEventArgs e, AsyncCallback callback)
        {
            if(datagridviewrowheightinfopushedeventhandler == null) throw new ArgumentNullException("datagridviewrowheightinfopushedeventhandler");

            return datagridviewrowheightinfopushedeventhandler.BeginInvoke(sender, e, callback, null);
        }
Example #6
0
 //-------------------------------------------------------------------------------------
 /// <summary>
 /// 
 /// </summary>
 /// <param name="e"></param>
 protected override void OnRowHeightInfoPushed(DataGridViewRowHeightInfoPushedEventArgs e)
 {
  ControlInfo ci = GetControl(e.RowIndex);
  if(ci == null || ci.Control == null || ci.Opened == false)
   return;
  ci.Height = e.Height - this.RowTemplate.Height;
  if(ci.Height > cMaxHeight)
  {
   ci.Height = cMaxHeight - this.RowTemplate.Height;
   Rows[e.RowIndex].Height = cMaxHeight;
   e.Handled = true;
  }
  base.OnRowHeightInfoPushed(e);
 }