Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Problem with Listview

Problem with Listview

Scheduled Pinned Locked Moved Visual Basic
helpcsharp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    poonams
    wrote on last edited by
    #1

    hi all thanks for previous reply. I have another qurey.I serched lot for this ,but did't get proper solution. Actully in my application m using vb.net2003 and access.On one form I have used tabcontrol with 2 tabpages.On 1st tabpage there is list view.I wt i want is ,when i click on any item the text of that item should display on textbox of another tabpages.To get text value of item i wrote several code like [code] Dim item As ListViewItem Dim column As Integer MessageBox.Show(item.SubItems(0).Text) or MsgBox(LstRecord.SelectedItems(1).Text) or MsgBox(LstRecord.SelectedItems(1).SubItems(2).Text) or l1.Text = LstRecord.SelectedItems(3).Text.ToString or MsgBox(e.Item.ToString) [/code] it fails every time.Plz help me.

    poonam

    C 1 Reply Last reply
    0
    • P poonams

      hi all thanks for previous reply. I have another qurey.I serched lot for this ,but did't get proper solution. Actully in my application m using vb.net2003 and access.On one form I have used tabcontrol with 2 tabpages.On 1st tabpage there is list view.I wt i want is ,when i click on any item the text of that item should display on textbox of another tabpages.To get text value of item i wrote several code like [code] Dim item As ListViewItem Dim column As Integer MessageBox.Show(item.SubItems(0).Text) or MsgBox(LstRecord.SelectedItems(1).Text) or MsgBox(LstRecord.SelectedItems(1).SubItems(2).Text) or l1.Text = LstRecord.SelectedItems(3).Text.ToString or MsgBox(e.Item.ToString) [/code] it fails every time.Plz help me.

      poonam

      C Offline
      C Offline
      ChandraRam
      wrote on last edited by
      #2

      What error do you get? The following could be issues with your code:

      poonams wrote:

      MessageBox.Show(item.SubItems(0).Text)

      item is not instantiated

      poonams wrote:

      MsgBox(LstRecord.SelectedItems(1).Text) or MsgBox(LstRecord.SelectedItems(1).SubItems(2).Text) or l1.Text = LstRecord.SelectedItems(3).Text.ToString

      Most likely the maximum array subscript of SelectedItems is less than 1, ie., you have only selected 1 item from the list.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups