DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Cody Laird Guest

    List view question


    In code when setting an Item in the List View controls Items collection Selected
    Property = True, how do you get the row to highlight as if the user had clicked
    on it ? (ListView Control, View=Details, FullRowSelect=True, GridLines=True)

    i.e.: Me.ListView1.Items(0).Selected = True

  2. #2
    CMG Guest

    Re: List view question


    Uhm, if u do me.listVie1.Items(0).selected = True to select it by code, u
    have to do
    me.listview1.items(0).select afterwards to actually make it work

    "Cody Laird" <cody.laird@suntrust.com> wrote:
    >
    >In code when setting an Item in the List View controls Items collection

    Selected
    >Property = True, how do you get the row to highlight as if the user had

    clicked
    >on it ? (ListView Control, View=Details, FullRowSelect=True, GridLines=True)
    >
    >i.e.: Me.ListView1.Items(0).Selected = True



  3. #3
    Cody Laird Guest

    Re: List view question


    That pointed me in the right direction... you actually need to do a "ListView1.Select"
    to get it to highlight...


    Thanks!

    "CMG" <f00@boxfrog.com> wrote:
    >
    >Uhm, if u do me.listVie1.Items(0).selected = True to select it by code,

    u
    >have to do
    >me.listview1.items(0).select afterwards to actually make it work
    >
    >"Cody Laird" <cody.laird@suntrust.com> wrote:
    >>
    >>In code when setting an Item in the List View controls Items collection

    >Selected
    >>Property = True, how do you get the row to highlight as if the user had

    >clicked
    >>on it ? (ListView Control, View=Details, FullRowSelect=True, GridLines=True)
    >>
    >>i.e.: Me.ListView1.Items(0).Selected = True

    >



  4. #4
    CMG Guest

    Re: List view question


    No Problem, Glad to Be Of Service

    "Cody Laird" <cody.laird@mindspring.com> wrote:
    >
    >That pointed me in the right direction... you actually need to do a "ListView1.Select"
    >to get it to highlight...
    >
    >
    >Thanks!
    >
    >"CMG" <f00@boxfrog.com> wrote:
    >>
    >>Uhm, if u do me.listVie1.Items(0).selected = True to select it by code,

    >u
    >>have to do
    >>me.listview1.items(0).select afterwards to actually make it work
    >>
    >>"Cody Laird" <cody.laird@suntrust.com> wrote:
    >>>
    >>>In code when setting an Item in the List View controls Items collection

    >>Selected
    >>>Property = True, how do you get the row to highlight as if the user had

    >>clicked
    >>>on it ? (ListView Control, View=Details, FullRowSelect=True, GridLines=True)
    >>>
    >>>i.e.: Me.ListView1.Items(0).Selected = True

    >>

    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links