C# Arrastrar y soltar en la vista de lista entre grupos

I've got several groups and items in my listview and I need to drag items between these groups. The problem is: in my realization, each group can be empty. Empty groups in listview are not displayed but this can be solved by placing there item with empty Text field. However, in this case it is impossible to drag an item into empty group as long as I use common solutions, like este.

So is it possible to solve this problem somehow using listview? Or maybe I should use some other control to provide this functionality?

preguntado el 24 de agosto de 12 a las 05:08

I mean, I can't drag an item into group which only contains blank item. There is no problem to make group visible by adding empty item. -

1 Respuestas

Could you not just make your code add an empty text field when the user drags out the last item and vice versa when the user puts a new item in the code automatially removes the empty text field? I know it's a slight work around but it would solve your problem and save you having to change controls.

Respondido 24 ago 12, 08:08

I'm afraid you didn't understand me. I considered this idea, but when I leave an empty item in a group, it's impossible to drag another one to this group. The problem is that empty item doesn't occupy some space in listview, so you can't drop dragged item on it, at least while using something like GetItemAt(...) method. - Konstantin Balchikov

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.