This is a migrated thread and some comments may be shown as answers.

Binding two tables

1 Answer 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mustafa
Top achievements
Rank 1
Mustafa asked on 16 Jan 2009, 01:01 PM
I have two tables similar to this

Employees:
EmployeeID    EmployeeName TitleCode
1                     Mustafa  1
2                     Ahmed                 2
3                     Mikel                         1
4                     Suzan                       2

Titles:
Title Code  Title                    
1                Supervisor   
2                Manager 

I'm using radGridView.
what I would like to do is how to display in the grid view with this layout:
EmployeeID    EmployeeName      Title
1                     Mustafa        Supervisor          
2                     Ahmed               Manager 
3                     Mikel                       Supervisor          
4                     Suzan                     Manager 

When I was using VS gridview I as doing :
1- gridview->datasource = employees table
2- then I was selecting the gridview -> rightclick -> edit columns ->then i was chaging the column type propertyo of the required column (in this case the title code )to DataGridViewComboBoxColumn then 
Datasource: Titles table
Display Memeber: title column
Value Memeber: titlecolde 
DataPropertyName:title code in the employees table.

Any help please??


1 Answer, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 19 Jan 2009, 05:16 PM
Hello Mustafa,

Thank you for contacting us.

This is a very common scenario and you can easily achieve it by using GridViewComboBoxColumn. Please, find detailed description in our help section. Also you can take a look in the Column Types sample in the Telerik's example application.

Do not hesitate to contact me again if you have other questions.

Greetings,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Mustafa
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Share this question
or