I have a DataGridView and I would like to place a button in the leftmost column's header cell. This button will be clicked by a user to insert a new record in the DGV rather than using the DGV's usual features. Each row, has "Delete" and "Edit" buttons, which work perfectly. Anyway, I have scoured the forums and Googled, but have only found the following reference that provides some information about programming this idea:
Unfortunately, it didn't work. The instructions said to subclass the DGV, override the OnMouseClick method, and look for when the "Row and Column index values are -1". There is only one parameter to the method and it does not contain these fields... The closest matches are X and Y and Location.X and Location.Y, and these fields never contained -1 when I clicked the header cell... It seems to me that others must have accomplished placing a button in this location... HELP!!! Currently, I have placed an "Insert" button on the form, but it would be much more meaningful in the location that I have mentioned... Closer to the context of the operation to be performed on the DGV.
Thanks in advance for any and all ideas!