#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2007
    Posts
    169
    Rep Power
    37

    Locate On Dbgrid


    Hi

    Is there anyway of selecting a FOUND record on a dbgrid

    I have this code

    Code:
    dbggrid1.DataSource.DataSet.Locate('ClientNumber',eclientnumber.text,[]);
    I find the client on the grid perfectly. But i want to select that record WITHOUT MANUALLY clicking on it. Ive tried setfocus.Selectedindex. I have no idea.

    Please help

    Thanks
    Last edited by icuras; March 16th, 2013 at 04:52 AM.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2008
    Posts
    354
    Rep Power
    7
    Locate will set the first matched record as the current record, so not sure what the issue may be other than, possibly, your search isn't actually matching any records.

IMN logo majestic logo threadwatch logo seochat tools logo