adrianjohnson
Programmer
I have 2 tables in a SQL Server 2000 database - Users and Department. The link between them is an integer field, ID.
In my form in VB.NET 2005, I have a datagrid, and some details fields, showing the data from the Users table. So when a user selects a cell in the datagrid, the details section is filled with the relevant information (from the Users table).
However, as the link to the Department table is an integer, I don't want to display a combo box with the integer value in - I'd rather populate the combo box with all the departments, but the correct one is displayed when the user selects the cell in the datagrid. E.g. if the user selects Bob the User, his details appear in the correct section including the name of the department (read from the Department) table, not the id value.
At the moment, I have a DataAdpater, DataView and DataSet for each table. I'm not sure that's the best way of doing things - I found it better to code everything, rather than use the wizards.
Any help would be appreciated.
Thanks,
Adrian Johnson
Let me know if you need to see my code. I wondered whether a description would be sufficient (as it's not a problem with code, as such).
In my form in VB.NET 2005, I have a datagrid, and some details fields, showing the data from the Users table. So when a user selects a cell in the datagrid, the details section is filled with the relevant information (from the Users table).
However, as the link to the Department table is an integer, I don't want to display a combo box with the integer value in - I'd rather populate the combo box with all the departments, but the correct one is displayed when the user selects the cell in the datagrid. E.g. if the user selects Bob the User, his details appear in the correct section including the name of the department (read from the Department) table, not the id value.
At the moment, I have a DataAdpater, DataView and DataSet for each table. I'm not sure that's the best way of doing things - I found it better to code everything, rather than use the wizards.
Any help would be appreciated.
Thanks,
Adrian Johnson
Let me know if you need to see my code. I wondered whether a description would be sufficient (as it's not a problem with code, as such).