I have a datagrid which is populated with CSV data when the user drag/drops a file onto it. Is it possible to display a message in the blank grid for example ‘Please drag a file here’ or ‘This grid is currently empty’. The grid currently displays as a dark grey box as I wait until the file is dragged to setup the columns etc.
Share
We subclassed the DataGridView control and added this. We didnt need the drag/drop functionality – we just needed to tell the user when there was no data returned from their query.
We have an emptyText property declared like this:
and overloaded the PaintBackground function: