3 Answers, 1 is accepted
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 16 May 2011, 09:53 AM
Hello,
In the demos on your PC where the Telerik Controls are installed is a good demo of using Drag and Drop with a RadListControl which of course also shows adding and removing items from 2 RadListBoxes.
If you need further help however, please let me know
Thanks
Richard
In the demos on your PC where the Telerik Controls are installed is a good demo of using Drag and Drop with a RadListControl which of course also shows adding and removing items from 2 RadListBoxes.
If you need further help however, please let me know
Thanks
Richard
0
Sandesh
Top achievements
Rank 1
answered on 06 Nov 2012, 11:38 AM
Hi Richard,
I have seen the demo but I am still a bit confuse about exact working of same.
Can you please elobrate this using any event of list view?
As I am working on functionality of adding item from RadListControl to RadListView on single click and not drag and drop.
I have set the ViewType property of RadListView to ItemView.
I am using event of SelectedIndexChanged to add item to RadListView and at same time I am removing it from RadListControl.
Then on ItemRemoving event of radListView I am adding the same Item back to RadListControl.
While doing so I am getting exception of Collection can not be modified as it is read only.
Can you please help me with this?
I have seen the demo but I am still a bit confuse about exact working of same.
Can you please elobrate this using any event of list view?
As I am working on functionality of adding item from RadListControl to RadListView on single click and not drag and drop.
I have set the ViewType property of RadListView to ItemView.
I am using event of SelectedIndexChanged to add item to RadListView and at same time I am removing it from RadListControl.
Then on ItemRemoving event of radListView I am adding the same Item back to RadListControl.
While doing so I am getting exception of Collection can not be modified as it is read only.
Can you please help me with this?
0
Hello Sandesh,
Thank you for writing.
RadListView does not have a ViewType called ItemVIew. It has ListView, IconsView and DetailsView.
As to the approach used, I would suggest that you use the MouseDown event. Here is a sample when RadListView is in ListView mode:
I hope this helps.
Kind regards,
Stefan
the Telerik team
Thank you for writing.
RadListView does not have a ViewType called ItemVIew. It has ListView, IconsView and DetailsView.
As to the approach used, I would suggest that you use the MouseDown event. Here is a sample when RadListView is in ListView mode:
public
Form1()
{
InitializeComponent();
radListControl1.MouseDown += radListControl1_MouseDown;
radListView1.MouseDown += radListView1_MouseDown;
}
void
radListView1_MouseDown(
object
sender, MouseEventArgs e)
{
SimpleListViewVisualItem el = radListView1.ElementTree.GetElementAtPoint(e.Location)
as
SimpleListViewVisualItem;
if
(el !=
null
)
{
radListControl1.Items.Add(el.Data.Text);
radListView1.Items.Remove(el.Data);
}
}
void
radListControl1_MouseDown(
object
sender, MouseEventArgs e)
{
RadListVisualItem el = radListControl1.ElementTree.GetElementAtPoint(e.Location)
as
RadListVisualItem;
if
(el !=
null
)
{
radListView1.Items.Add(el.Data.Text);
radListControl1.Items.Remove(el.Data);
}
}
I hope this helps.
Kind regards,
Stefan
the Telerik team