Results 1 to 6 of 6

Thread: Accessing Items in ListView Control-pls guide

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2004
    Posts
    97

    Accessing Items in ListView Control-pls guide

    Hello Everybody:
    I am working on two ListView Control. I have 10 client details(client name and phone number) stored in one ListViewControl. I have the address of 10 clients stored in another ListViewControl...Now I want to select the information for say 5th Client(name and phonenumber) and its corresponding address in the second listbox and display it on a textbox. I want to select the correct client name and telephone in the first list View and its corresponding address in the second ListView Control. If I select the wrong address or wrong client name, it should display an error message

    Pls guide what properties,methods should I use in ListView Control to access the items...

    Thanks in advance...

    K

  2. #2
    Addicted Member
    Join Date
    Jun 2003
    Location
    Birmingham, AL
    Posts
    188
    you really havent given enough information. Do you have a field or something that tells you which address cooresponds with which name an phone?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2004
    Posts
    97

    Accessing Items in ListView Control-pls guide

    I do not have any field or something thats tells which address correspnds to which name and phone. The client details (name and phone number) is being added into listview1 as

    Client 1
    Client 2
    Client 3
    Client 4

    Similarly the address in listview 2 is being added as

    Address 1
    Address 2
    Address 3
    Addres 4

    Now I want to select Client and Address in such a way that Client 1 should correspond to Address 1 only, Client 2 should corresspond to Address 2 only.

    Is there a way how to do that ? Pls guide..

    K




    Originally posted by Tewl
    you really havent given enough information. Do you have a field or something that tells you which address cooresponds with which name an phone?

  4. #4
    Addicted Member
    Join Date
    Jun 2003
    Location
    Birmingham, AL
    Posts
    188
    hm well i guess u can compare the selected index of each listview

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Feb 2004
    Posts
    97

    Accessing Items in ListView Control-pls guide

    I am not finding the selected index method in the listview control.

    Can you show an example how to do it...It will be a great help.

    K


    Originally posted by Tewl
    hm well i guess u can compare the selected index of each listview

  6. #6
    Addicted Member
    Join Date
    Jun 2003
    Location
    Birmingham, AL
    Posts
    188
    There should be enough information here for you to understand.

    Listview class:

    http://msdn.microsoft.com/library/de...classtopic.asp

    ListviewItem class:

    http://msdn.microsoft.com/library/de...classtopic.asp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width