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

Substitute text descriptions for datasource numeric values

2 Answers 17 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Antony
Top achievements
Rank 1
Antony asked on 04 Dec 2008, 03:05 PM
HI,

I have a radgrid bound to a datasource which provides the following data columns:

Username
DepartmentID

So at the moment my Radgrid displays the UserName and the ID value of the department they work in.

I have another datasource which provides the following data:
DepartmentID
DepartmentName

I would like my Radgrid to display: Username, DepartmentName
Is there a way to substitute the numeric ID values in the grid datasource with the Text description coming from another datasource?

Many thanks
Antony

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Dec 2008, 07:06 AM

Hi ,

One suggesction is that you can join both tables, and then set that Dataset to DataSource of the RadGrid to show the desired result.

Thanks,
Princy.

0
Antony
Top achievements
Rank 1
answered on 05 Dec 2008, 10:03 AM

Hi Princy,

 

Thanks for your suggestion, problem is that the 2 datasources are actually 2 Business objects because I don't have direct access to the database from the UI.

In one of your demos I saw a way of binding a dropdownlist to a datasource and then the SelectedItem property to a column from the datasource of the grid to provide inline editing. This is the type of solution I'm looking for except without the dropdownlist.

Many thanks
Antony

Tags
Grid
Asked by
Antony
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Antony
Top achievements
Rank 1
Share this question
or