Link to home
Start Free TrialLog in
Avatar of abidsml
abidsml

asked on

db grid

i have a db grid and i need when i click on a row (record) display one field from the gid in a text box it works only on the press of a second click not the first Why and ho to solve this
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Try to locked the columns.
ASKER CERTIFIED SOLUTION
Avatar of kojot
kojot

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mmshah
mmshah

Hi,
The easier way to slove this problem is to trap MouseDown event. And using this you should get your text box on first click. This assumes that your first control on the form is Grid control. I hope this will work.
The addition to my earlier comment please use RowContaining and ColContaining methods, which will make sure that you get the text box in your desired field.
Use the RowColChange event.
Avatar of abidsml

ASKER

well i have used the code above, it behaves silly, when i click first time works, but when i scroll down to get an entry at the bottom of the grid it returns to the top of the grid when i click. !!!