4 Replies - 439 Views - Last Post: 14 January 2013 - 09:40 AM Rate Topic: -----

#1 jmProg  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 04-July 12

ListView in Vb.Net

Posted 14 January 2013 - 04:45 AM

Here's my code:

Dim selectedItem As Integer = ListView1.SelectedIndices(0)

TextBox1.Text = ListView1.Items(selectedItem)


When a row (of data) in ListView1 is selected, the data in it must be shown in the textbox. At first click, it appears, but when I select another row of data, it won't appear. There's an error message. How can I fix it?

Any suggestion is appreciated. Thank you :)

Is This A Good Question/Topic? 0
  • +

Replies To: ListView in Vb.Net

#2 Michael26  Icon User is offline

  • DIC-head, major DIC-head
  • member icon

Reputation: 355
  • View blog
  • Posts: 1,524
  • Joined: 08-April 09

Re: ListView in Vb.Net

Posted 14 January 2013 - 05:16 AM

Quote

There's an error message.

What is it?
Was This Post Helpful? 0
  • +
  • -

#3 kai_itz me  Icon User is offline

  • D.I.C Head

Reputation: 28
  • View blog
  • Posts: 159
  • Joined: 03-August 12

Re: ListView in Vb.Net

Posted 14 January 2013 - 05:18 AM

My link
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3574
  • View blog
  • Posts: 11,114
  • Joined: 05-May 12

Re: ListView in Vb.Net

Posted 14 January 2013 - 05:43 AM

Moving to VB.NET.
Was This Post Helpful? 0
  • +
  • -

#5 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5519
  • View blog
  • Posts: 11,827
  • Joined: 02-June 10

Re: ListView in Vb.Net

Posted 14 January 2013 - 09:40 AM

He meant "what is the error message?"
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1