I have a Windows form with a calendar which is hidden. I want to show the form right under the current cell of a DataGridView. The position changes according to the position of current cell.
I don't want the current cell or current column, I want the position so that I can set the location of my date forms.
Here is what I am using but its not working:
int po_X = paygrid.GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, false).Left+paygrid.Left;
int po_Y = paygrid.GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, false).Bottom+paygrid.Top;
form_date.Location = new System.Drawing.Point(po_X, po_Y);