Drag n Drop items within is own columns (vb.net)



Hi, I was just wondering, if I have a list view control, with 2 columns, and insert items to those columns, ex:



LIST VIEW ANIMALS - CARS  

Col1 Animals  Col2 Cars  

Jaguar ................... XJR  

Tiger .................... DB9  

Bull ..................... Gallardo



Can I move items from 1 COLUMN to another? Like so: (Moving Gallardo from col2 to Col1)



LIST VIEW ANIMALS - CARS  

Col1 Animals  Col2 Cars  

Jaguar ................... XJR  

Tiger .................... DB9  

Bull .....................  
**Gallardo**



That is my question I hope you can give me an answer if this can be achieved trough the listview control from [vb.net](http://vb.net/) or other control that you know of. If you post an example in C#, maybe I can create al DLL and put it as a control in my [vb.net](http://vb.net/) tools, but I just want to know if this can be done.



If I can achieve this, I will post the results.



Thank you all!
It's hard to do that because each item is not individual, in your example, Gallardo is by itself a subitem of Bull item. If you need to do that, the best attempt i can think about, is to create 2 listviews placed together with BorderStyle=None so they appear as the same and then handle the Drag and Drop event of each one so you can "exchange" items between both lists.



Hope this helps you to solve your need.
I have figured out this issue and so for anyone else with the same issue.

In Designer for your XDP make sure you have a subform as the entry for the table row, and make this subform "Repeat Subform for Each Data Item" I found the subform could not be within another subform for this option to be visible.

So after this you can assign the row to the subform and the elements to the elements within the subform and hopefully it'll work.




[View solution in original post](/t5/adobe-experience-manager-forms/dynamic-rows-in-a-table-issue-also-relates-to-having-elements/m-p/204725#M6246) Yes  

You would need to run the ‘LABEL ON’ SQL Statement.  

Here is a sample of code that changed the column heading for field JOBID from ‘Job ID’ to ‘NEW COLUMN HEADING’  

File is CD053DB In library Charlieb


LABEL ON COLUMN CHARLIEB/CD053DB (JOBID IS ‘NEW COLUMN HEADING’) tab visibility is currently only based on the user profile sheet. if you want to control tab visibility from a value in another sheet, you need to use relation/lookup, relation/rollup, or single value columns to bring in whatever value you need into the user profile sheet.

[https://docs.glideapps.c…](https://docs.glideapps.com/all/reference/design-and-structure/visibility-conditions#tab-visibility) You could try using the in line view like this:


Select table1.col1, table1.col2, table1…., table2.col1, table2.col2, table2….  

 from  

(SELECT *  

FROM dbo.Shaft\_Scales  

WHERE dbo.Shaft\_Scales.ID = (SELECT max(ID) from dbo.Shaft\_Scales ID) as table1,  

(SELECT *  

FROM OtherTable  

WHERE dbo.OtherTable.ID = (SELECT max(ID) from dbo.OtherTable ID) as table2


—————- another approach from meandyou 


This works on [at least some] SQL processors


SELECT T1.* , T2.*  

FROM table1 T1, table2 T2  

WHERE …


Do we have to discuss why not to use “SELECT * ” in your SQL?<pre>


Try this


SELECT * FROM T1 as a, T2 as b WHERE a.ID = (SELECT max(ID) from T1)  

and b.ID = (SELECT max(ID) from T2);</pre> [@whyyouandi](/u/whyyouandi)

[image] whyyouandi:

i want to append another column of data.

you can add a column with [add data column] activity.

<https://www.uipath.com/activities-guide/add-data-column>

[image] whyyouandi:

and then edit the scrap date per row.

and to add a value to a target column, ch… hi, @ricky007 
create table bill\_stag
(
s\_categry varchar2(20),
s\_billnum varchar2(20)
);

insert into bill values('1111','5647859541785');
watch out! you're using two different table names there.
you don't care which m\_billnum\_seq gets assigned to which new row, do you? (you shouldn't.) in that case, you can simplify the cross join approach that cormaco suggested like this:
insert into bill\_mast (m\_bill\_seqnum, m\_billnum, channel) -- always name the columns
with  all\_channels  as
(
 select 'mob' as channel  from dual  union all
 select 'atm'      from dual
)
select  seq\_num.nextval
, s.s\_billnum
, c.channel
from     bill\_stag    s
cross join all\_channels c
;
you don't need order by, so you don't need the ord column and you don't need so an extra sub-query. i would do it like this:

https://www.advanced-excel.com/columns-to-rows.html hi [@jitse\_b](/u/jitse_b)

welcome to the community !

yes you can, there are various ways to do so.

the simplest:

you may want to create a table with 3 columns,

key\_column, type text, value “k000” (or whatever you want, it doesn’t matter if you stick to only one comparison)

“material1”, type ref, source tabl… hi [@jason.danforth](/u/jason.danforth),

all objects in the document are stored in the objecttable (rhino.docobjects.tables.objecttable). if you just want to select them, you can loop through them and use objecttable.select() method

import rhino

for robj in rhino.rhinodoc.activedoc.objects:

if robj.isnormal:

… **IMPORTANT NOTE:** You have to **sort your data** first.







The part I didn't get is that in the example construction



```
groups = []
uniquekeys = []
for k, g in groupby(data, keyfunc):
   groups.append(list(g))    # Store group iterator as a list
   uniquekeys.append(k)

```

`k` is the current grouping key, and `g` is an iterator that you can use to iterate over the group defined by that grouping key. In other words, the `groupby` iterator itself returns iterators.


Here's an example of that, using clearer variable names:



```
from itertools import groupby

things = [("animal", "bear"), ("animal", "duck"), ("plant", "cactus"), ("vehicle", "speed boat"), ("vehicle", "school bus")]

for key, group in groupby(things, lambda x: x[0]):
    for thing in group:
        print("A %s is a %s." % (thing[1], key))
    print("")
    

```

This will give you the output:



> 
> A bear is a animal.  
> 
> A duck is a animal.
> 
> 
> A cactus is a plant.
> 
> 
> A speed boat is a vehicle.  
> 
> A school bus is a vehicle.
> 
> 
> 


In this example, `things` is a list of tuples where the first item in each tuple is the group the second item belongs to.


The `groupby()` function takes two arguments: (1) the data to group and (2) the function to group it with.


Here, `lambda x: x[0]` tells `groupby()` to use the first item in each tuple as the grouping key.


In the above `for` statement, `groupby` returns three (key, group iterator) pairs - once for each unique key. You can use the returned iterator to iterate over each individual item in that group.


Here's a slightly different example with the same data, using a list comprehension:



```
for key, group in groupby(things, lambda x: x[0]):
    listOfThings = " and ".join([thing[1] for thing in group])
    print(key + "s:  " + listOfThings + ".")

```

This will give you the output:



> 
> animals: bear and duck.  
> 
> plants: cactus.  
> 
> vehicles: speed boat and school bus.
> 
> 
>