Good Day ,
I have 2 windows forms (form_source and form_target) with listviews
(lstviewSource and lstviewTarget) respectively. When the items from
the "listviewSource" is selected it needs to be displayed on
"lstviewTarget".I am cloning the items from the listview in
"form_source" but it is not displaying on the listview on "form_target".
below is the code.... thanks in advance.
*****************************************************
method on form_target
public void CopySelectedItems(ListView _lstviewSource)
{
foreach (ListViewItem item in _lstviewSource.Items)
{
if (item.Checked)
{
lstviewTarget.Items.Add((ListViewItem)item.Clone());
}
}
}
******************************************************
method on form_source
private void btnAddImages_Click(object sender, EventArgs e)
{
form_target myform = new form_target();
myform.CopySelectedItems(lstviewTarget);
this.Close();
}
******************************************************