Link to home
Start Free TrialLog in
Avatar of mgmhicks
mgmhicks

asked on

How to select a single row from a dataset table

I have a dataset table bound to a couple of text boxes.    I have a find button a a list of residents come up.  When the user double clicks the row on the grid I caputre that rows ID #.  I then want to take the dataset table I have and and go the the record of the ID.  I am using a bindingsource object, and I know I can use bs.position to get current position but how do I find the record with the ID selected and then make that the currently selected row.

thanks in advance
Avatar of Jesus Rodriguez
Jesus Rodriguez
Flag of United States of America image

Why don't you bind the controls to the same bindingsource of the grid and will be easy for you.
Also, did you have a bindingnavigator or bindingsource for the textboxes or you fill the textboxes directly from your dataset on a sub??
Avatar of mgmhicks
mgmhicks

ASKER

the textboxes are bound first.  I am using a bindingsource to do that so I can use bs.position + 1 and the textboxes fill with the next record.  However when the click the find button, they get a grid, bound to different source, but selects the ID.  ONce I have the ID I want to go the that record in the bs that matches the ID selected.
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

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