option to include headers when copying values from data grids

It'd be great if, when selecting rows in data grids and copying them to the clipboard, there could be an option to also include the headers.

e.g. new [] { new System.Drawing.Point(5, 6), new System.Drawing.Point(20, 19), new System.Drawing.Point() }

image

"Copy selection" currently puts this on the clipboard:
	False	20	19
True 0 0
and selecting the whole thing (i.e. from the top left header square) gives us:
	False	5	6
False 20 19
True 0 0
it'd be great to have an item in that context menu to "Copy selection with headers", to get:
	IsEmpty	X	Y
False 20 19
True 0 0
which would obviously also take into account which columns are actually included in the selection, so that:

image

would result in:
X	Y
20 19
0 0

Comments

  • This would be insanely useful; my main use case for copying data out of a grid is for sharing the results in emails or IM's to colleagues, so unless there are only a couple of columns (which sadly in the Database there's not) I always have to stop and manually insert column headers before proceeding.
  • This is now available in the latest beta:
    http://www.linqpad.net/download.aspx#beta
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!