Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Programming Languages A Place for windows applications programs and programmers .

Programming Languages Thread, C Sharp - SelectedIndex Event!!! in Programming , WebDesign & Development; I want to put dhe datas to textboxes from listview items when I select a row. It's all ok after ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=18364


Reply
LinkBack Thread Tools Display Modes
C Sharp - SelectedIndex Event!!!
 
 
Senior Member

Reply With Quote
 
Join Date: Dec 2008
Posts: 18,122
18-01-2009, 07:20 AM
 
I want to put dhe datas to textboxes from listview items when I select a row. It's all ok after the first selection occurs. But when I select again this error occurs: "*System.ArgumentOutOfRangeException*". Is there a way to reset the selecteditem...

I want to put dhe datas to textboxes from listview items when I select a row.
It's all ok after the first selection occurs. But when I select again this error occurs: "System.ArgumentOutOfRangeException". Is there a way to reset the selecteditem to starting condition, after I select a row. Or maybe another solution, here's the code:
Code:
private void listView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)

{
this.txtID.Clear();
this.txtSurname.Clear();
this.txtName.Clear();


this.txtID.Text = Convert.ToString(this.listView1.SelectedItems[0].SubItems[0].Text);
this.txtSurname.Text = Convert.ToString(this.listView1.SelectedItems[0].SubItems[1].Text);
this.txtName.Text = Convert.ToString(this.listView1.SelectedItems[0].SubItems[2].Text);

}
 
 
 
Reply

Programming Languages Thread, C Sharp - SelectedIndex Event!!! in Programming , WebDesign & Development; I want to put dhe datas to textboxes from listview items when I select a row. It's all ok after ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=18364


Bookmarks

Tags
event, selectedindex, sharp


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump