Results 1 to 11 of 11

Thread: Selecting the first item in a DataList

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2001
    Location
    San Jose
    Posts
    70

    Selecting the first item in a DataList

    Hi

    I have created a DataList and I populate it with names and ID's
    I wish to select the first item in the data list after it is populated.

    Any ideas
    Thanks


  2. #2
    Member
    Join Date
    Sep 2002
    Posts
    56
    email me

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2001
    Location
    San Jose
    Posts
    70

    Email you what?

    What do you wish me to email you?

  4. #4
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Re: Email you what?

    Originally posted by Howard7890
    What do you wish me to email you?
    He is wasting your time.

    Can you use a MsFlexGrid rather than a DataGrid?
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  5. #5
    Fanatic Member
    Join Date
    Aug 2001
    Location
    Connecticut
    Posts
    855
    Does WattsTech have any friends?
    VB 6.0, Access, Sql server, Asp

  6. #6
    Member
    Join Date
    Sep 2002
    Posts
    56
    No, I could ahve had but since you do not want me I will leave this thread.

  7. #7
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    Originally posted by ralph
    Does WattsTech have any friends?
    He is posted crap throughout all the forums. Mods will get him soon...
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  8. #8

  9. #9
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  10. #10
    Fanatic Member
    Join Date
    Aug 2001
    Location
    Connecticut
    Posts
    855
    Ok, here's how to programatically select (highlight) the first item in datalist:
    DataList1.SetFocus
    SendKeys "{up}", True

    To display the selection:
    Text1.Text = DataList1.BoundText
    VB 6.0, Access, Sql server, Asp

  11. #11
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    Doesn't dbgrid have a selected property? or similar?
    VB Code:
    1. lstsummat.itemdata(0).selected=true

    (just wondering)

    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

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