How to restrict copy in dgv while different row different columns selected?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi all,
I need to setup function in DataGrid View, funcions which is available like Ms Excel copy ."If same column in the all row s selected, then only allow to copy the content. otherwise Excel throws message like "that command cannot be used on multiple Selections".
like wise I need to apply that one in Datagrid view? Is it possible. If so then guide me to come out of this issue.
E,g In Excel Sheet
<span style="white-space:pre <br/>
A<span style="white-space:pre BC<span style="white-space:pre
D<span style="white-space:pre E<span style="white-space:pre
F<span style="white-space:pre GH<span style="white-space:pre I<span style="white-space:pre
J
<span style="white-space:pre z<span style="white-space:pre 1
2<span style="white-space:pre 3<span style="white-space:pre 4<span style="white-space:pre
56<span style="white-space:pre 7<span style="white-space:pre
8<span style="white-space:pre 9<span style="white-space:pre 0
y<span style="white-space:pre 0<span style="white-space:pre
9<span style="white-space:pre 8<span style="white-space:pre 76<span style="white-space:pre
5<span style="white-space:pre 4<span style="white-space:pre
3<span style="white-space:pre 21<span style="white-space:pre
x<span style="white-space:pre 1 2<span style="white-space:pre
3<span style="white-space:pre 4<span style="white-space:pre 56<span style="white-space:pre
7<span style="white-space:pre 8<span style="white-space:pre
9<span style="white-space:pre 0
w<span style="white-space:pre 0<span style="white-space:pre
9<span style="white-space:pre 8<span style="white-space:pre 76<span style="white-space:pre
5<span style="white-space:pre 4<span style="white-space:pre
3<span style="white-space:pre 21<span style="white-space:pre
<span style="white-space:pre
<span style="white-space:pre I<span style="white-space:pre f i select the continuously ZB,ZC, ZD and press ctrl+c -> it copied in clipboard
<span style="white-space:pre again if i select <span style="white-space:pre ZB,ZC, ZD and YB,YC,YD AND PRESS CTRL +C -> IT COPIED
<span style="white-space:pre BUT IF I SELECT <span style="white-space:pre ZB,ZC, ZD and YB,YC THEN IT THROWS THE MESSAGE. Like that i need in datagrid view. Is it possible?
<span style="white-space:pre Here I pasted the Excel sheet copied and not allowed copied area FYR<span style="white-space:pre <span style="white-space:pre <br/>

<
Manikandan Murugeshan
<br/>
<img alt="" src="http://social.msdn.microsoft.com/Forums/getfile/213537 <br/>

View the full article
 
Back
Top