Comments on: DataGridView DataBound Copy, Paste, Drag, Drop http://jrwren.wrenfam.com/blog/2007/09/08/datagridview-databound-copy-paste-drag-drop/ babblings of a computer loving fool Mon, 21 Nov 2016 19:37:12 +0000 hourly 1 https://wordpress.org/?v=4.7.2 By: Aditya http://jrwren.wrenfam.com/blog/2007/09/08/datagridview-databound-copy-paste-drag-drop/comment-page-1/#comment-30960 Fri, 20 Mar 2009 10:01:30 +0000 http://jrwren.wrenfam.com/blog/2007/09/08/datagridview-databound-copy-paste-drag-drop/#comment-30960 This is very good and working fine but I have a small problem with the below code.

dataGridView1[col + i, row].Value =

Convert.ChangeType(cells[i], dataGridView1[col + i, row].ValueType);

If the type of column is nullable i.e., decimal? or byte? then valuetype returns “Nullable” type but not the underlying decimal or byte which is resulting in exceptions. Is there any work around for nullable fields?

]]>
By: Thomas http://jrwren.wrenfam.com/blog/2007/09/08/datagridview-databound-copy-paste-drag-drop/comment-page-1/#comment-30381 Wed, 30 Jan 2008 22:46:35 +0000 http://jrwren.wrenfam.com/blog/2007/09/08/datagridview-databound-copy-paste-drag-drop/#comment-30381 I encapsulated the code for dragging and dropping between DataGridView’s into a control. I saw a lot of code, but no control that was pre-built.

It is available at…

http://www.codeplex.com/dragdropgrid

]]>
By: jrwren http://jrwren.wrenfam.com/blog/2007/09/08/datagridview-databound-copy-paste-drag-drop/comment-page-1/#comment-29871 Tue, 09 Oct 2007 21:21:43 +0000 http://jrwren.wrenfam.com/blog/2007/09/08/datagridview-databound-copy-paste-drag-drop/#comment-29871 I think you can continue to hold CTRL when you drag.

I am unsure because in my use case I have multiselect disabled for to DGV

]]>
By: Mike Lasseter http://jrwren.wrenfam.com/blog/2007/09/08/datagridview-databound-copy-paste-drag-drop/comment-page-1/#comment-29870 Tue, 09 Oct 2007 21:13:06 +0000 http://jrwren.wrenfam.com/blog/2007/09/08/datagridview-databound-copy-paste-drag-drop/#comment-29870 This works great except I have one problem. If select multiple rows and then click the selection to drag the rows to their destination. The MouseDown event has been processed and the only row that is selected is the row I clicked to drag. Is there a way to suppress the MouseDown event from selecting the clicked row when I want to drag the selection?

]]>