W
William Ryan
I'm not totally sure I understand what you want to do, but
I'll give it a try...if not, let me know and I'll see what
I can do...
If you use a SQL Statement that Concatenates the fields ie
SELECT usrCod, usrLastName + ' ' + FirstName
AS 'Full_Name'... from Users.... That will give you the
name combo that you want. You can take your Checkouts
DataTable and base a DataView on it. Each time you switch
the user I don't know if it's in a grid or whatever, you
can set the DataView.Rowfilter = "UsrCode ='" &
actualcodefromControl & "'"
If you use a combo box or a list box or whatever control,
you can manipulate the DisplayMember and ValueMember
properties to show one value, but it still uses another
value internally. You can grab onto that value to filter
the view. You can take your pick of multiple ways to get
the UsrCode value from the DataTable (or you could use a
HashTable for instance, fill it with a DataReader and use
the combobox position as the Key and the UsrCode as the
value, then you could determine UsrCode from the
comboboxes index. These are just a few suggestions, you
can grab that filter value however you want. The main
thing is to set the RowFilter if you use a DataView.
You can also use a Bindingmanager to show the related
records (you'd need to bring out the old DataRelation
again though) and move the bmb's index based on the
control value.
Let me know if this helps..If not, let me know a little
more and I'll see what I can do.
Bill
Good Luck,
W.G. Ryan
www.knowdotnet.com
I'll give it a try...if not, let me know and I'll see what
I can do...
If you use a SQL Statement that Concatenates the fields ie
SELECT usrCod, usrLastName + ' ' + FirstName
AS 'Full_Name'... from Users.... That will give you the
name combo that you want. You can take your Checkouts
DataTable and base a DataView on it. Each time you switch
the user I don't know if it's in a grid or whatever, you
can set the DataView.Rowfilter = "UsrCode ='" &
actualcodefromControl & "'"
If you use a combo box or a list box or whatever control,
you can manipulate the DisplayMember and ValueMember
properties to show one value, but it still uses another
value internally. You can grab onto that value to filter
the view. You can take your pick of multiple ways to get
the UsrCode value from the DataTable (or you could use a
HashTable for instance, fill it with a DataReader and use
the combobox position as the Key and the UsrCode as the
value, then you could determine UsrCode from the
comboboxes index. These are just a few suggestions, you
can grab that filter value however you want. The main
thing is to set the RowFilter if you use a DataView.
You can also use a Bindingmanager to show the related
records (you'd need to bring out the old DataRelation
again though) and move the bmb's index based on the
control value.
Let me know if this helps..If not, let me know a little
more and I'll see what I can do.
Bill
Good Luck,
W.G. Ryan
www.knowdotnet.com