Hi Mohan,
Based on my understanding, you'd like to draw text on the column header with the row index of -1 and the column index of -1. If I'm off base, please feel free to let me know.
To get what you want, handle the CellPainting event of the DataGridView and draw text on the column header in question. When the user resizes the columns, the CellPainting event will be raised and the column header will be repainted in time. The following isa sample:
dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
if (e.ColumnIndex == -1 && e.RowIndex == -1)
false);
"col-1", e.CellStyle.Font, new SolidBrush(e.CellStyle.ForeColor), e.CellBounds);
true;
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
end us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.