Example:
Gridsrc
------------------
s1 s2 s3
------------------
1 1
1 2
2 1
2 2
2 3
3 1
3 3
4 2
GridDest
---------------------
d1 d2 d3 d4
---------------------
3 2 data1 data1
4 1 data1 data1
4 2 data1 data1
Let’s Consider:
tbl_Main has columns OrderNo, SeqNo and many Other columns. OrderNo, SeqNo are Primary key to the table tbl_Main.
tbl_SRC Column s1 is a foreign key (tbl_Main.OrderNo).
tbl_SRC Column s2 is a foreign key (tbl_Main.SeqNo).
tbl_Dest Columns d1 is a foreign key (tbl_Main.OrderNo)
tbl_Dest Columns d2 is a foreign key (tbl_Main.SeqNo).
Gridsrc binds data from tbl_SRC. s1 and s2 are id columns and s3 is Blank/null values.
GridDest binds data from tbl_Dest. d1 and d2 are id columns, d3 is blank and d4 has value.
When I drag a row from GridSrc to GridDest I have to take OrderNo(s1) & Seqno(s2) from GridSrc and update column s3 & d3 with the value d4 from tbl_Dest.
strd4 value will come from (select d4 from tbl_Dest where d4 <>'' and d3='' and d1= DragColumnvalue_s1 and d2= DragColumnvalue_s2)
Update tbl_Dest set d3= d4 where d1= DragColumnvalue_s1 and d2= DragColumnvalue_s2
Update tbl_SRC set s3= strd4 where s1=DragColumnvalue_s1 and s2=DragColumnvalue_s2
As s3 values is filled with 'data1' GridSrc will no longer show that row.
As value for d3 and d4 are same GridDest will show the new row.
Please let me know if you need more any detail.