DropDown in DataGrid
I need to put a dropdown box in datagrid for a specific column. This is quite possible with Template Column but my requirement is of a different kind, let me explain
Lets assume we have two tables
1)Employee
========
Fields
------
i) EmplyeeNumber
ii) EmployeeeName
iii)DeptartmentNumber
2) Dept
====
Fields
------
i) DepartmentNumber
ii)DeptName
Now, I'm trying to pull all the records from EMPLOYEE table into a DataGrid. Now when a user tries to edit, then all the fields must be in editable mode in textBoxes ( which is default ) except for DepartmentNumber. I wanna this column to consist of a dropdown box having unique departmentNumbers populated from DEPT table. The other condition is that when dropdown box is displayed in editable mode then the default value in dropdown list should reflect the value in the record from EMPLOYEE table.
Any help is highly appreciated
Thanks in advance
kiran
|