2 Replies - 7296 Views - Last Post: 11 March 2009 - 01:42 PM Rate Topic: -----

#1 smrithibca  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 10-March 09

Binding the selected data from listview control to the textbox and com

Post icon  Posted 10 March 2009 - 01:30 AM

Hi friends,
i have a problem with my listview control.i.e first of all i will describe clearly about application and then i will describe my problem.

i have a form and in that form i have a tabcontrol.in my tabcontrol.tabpage[0], i have 6 radio button when i click any one of the radio button and type the text in search fileld i shud get the matching information from the database and the data shud be put to the listview control,when i click the data in the listview i shud bind the selected data from the listview to the textbox control which is in tabcontrol.tabpage[1] .
and my problem is that i am not able put the selected data from the listview to the textbox control of the tabcontrol.tabpage[2]

Is This A Good Question/Topic? 0
  • +

Replies To: Binding the selected data from listview control to the textbox and com

#2 jbbatts77  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 07-January 09

Re: Binding the selected data from listview control to the textbox and com

Posted 11 March 2009 - 06:57 AM

Hey. I'm not 100% what you're asking. But I think you're asking to populate textboxes based on the selected item in a listview. if so:

if (listView1.SelectedItems.Count > 0)
{
	textbox1.text = listView1.SelectedItems[0].Text;
	textbox2.text = listView1.SelectedItems[0].SubItems[0].Text;
	textbox3.text = listView1.SelectedItems[0].SubItems[1].Text;
}


This post has been edited by jbbatts77: 11 March 2009 - 06:59 AM

Was This Post Helpful? 0
  • +
  • -

#3 smrithibca  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 10-March 09

Re: Binding the selected data from listview control to the textbox and com

Posted 11 March 2009 - 01:42 PM

Thank You.but my problem is that after i select the data from listview i want that data to be binded to the textbox in tabcontrol.tabpage=1.Actually my listview is in tabcontrol.tabpage=0
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1