Hi. I have been figuring out how to deal with my dilemma. I'm developing a mobile application in C# in Visual Studio 2005. And I have a question regarding the adding of listview items from a form to another listview in another form.
I have got my application running but it occured an error in the process. Here's my code:
This is the code from violationsForm1 form
public ListViewItem _listViewFrequent
{
get { return listViewFrequent.FocusedItem; }
}
private void mnuSelect_Click(object sender, EventArgs e)
{
mainForm frm = new mainForm();
frm._listViewFreq = _listViewFrequent;
frm.Show();
this.Close();
}
...and this code is from mainForm form.
public ListViewItem _listViewFreq
{
set
{ listViewNewData.Items.Add(value); }
}
Then when I trigger the Select Click Event an error shows like this:
MobileTApp.exe
ArgumentException
Value does not fall within the expected range.
at
ListViewItemCollection.Insert()
at
When I tried to make some tests like messagebox.show() in the select clck event. The selected item outputs with no problem. It's just when i export the item to the other form which is another listview. Also, listview does not allow adding of STRINGS. Please help.
I need to make listview selected items add to the other listview. ='(