|
-
March 23rd, 2010, 11:30 PM
#1
ADO.net ListView in C#
Hi Guys... need some help.. I have this code..
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
{
MessageBox.Show(listView1.SelectedItems[0].SubItems[0].Text);
}
and I always get this kind of error message evry time I change the selected Item im my listbox...
Argumentoutofrangeexception
InvalidArgument=Value of '0' is not valid for 'index'.
Parameter name: index
i need a way to get each value for the selected item in my listbox so that I can use it as a parameter for my sqlcommand.
need help.. =)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|