Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to simulate 'Lookup Functionality' in DataGrid like in Access

Status
Not open for further replies.

AshfaqAhmad

Programmer
May 28, 2003
4
0
0
US
Hi,
I'm using datagrid that is bound to a recordset generated from the a table that contains the followinf fields:

EmployeeId EmployeeDesination EmployeeAppDate ....
101 Manager 12/12/2002

here EmployeeId is foreignKey that is comming from the parent table. i want to show employee name in grid column rather than EmployeeId. and want to use DataGrid to read and write data. just like in MS Access we uase lookup table to replace the id with description. right now usinf ListBox control and Datagrid column Button to simulate the comboBox effect in Empolyee Column. Problem is when i assign the eployee name from ListBox to emloyee column of DataGrid it gives me Data Access Error, That I think due to type mismatch of Fields as employeeId is integer type while im assigning string value to grid column.....................any idea????
Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top