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

RadGrid

2 Answers 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sinan
Top achievements
Rank 1
Sinan asked on 03 May 2008, 04:14 PM
Hi,

I have two tables in my database (MEETINGS and LOCATIONS) MEETINGS table has a column LOCATION_ID which is an integer. Each LOCATION_ID has a string corresspondence which is stored in the LOCATIONS table.

I bound the MEETINGS table to the RadGrid but the values in the Location column is displayed as integer. I need the display the string correspondence of that integer. What is the best way to achieve this?

Here is an example

MEETINGS
Subject     Start Date      End Date     Location
   x 1                 y1              z 1                 1
   x 2                 y2              z 2                 2

LOCATIONS
Location_ID  Location
    1                     loc1
    2                     loc2
  
Thanks,
Sinan UYSAL
sinanuysal@gmail.com

2 Answers, 1 is accepted

Sort by
0
Kiara
Top achievements
Rank 1
answered on 04 May 2008, 04:44 PM
Sinan, I suppose that the logic necessary to implement the same with the GridView control from Visual Studio will be sufficient for the Telerik grid as well. Most probably the data in the grid columns will depend on the actual Select query you have, for example:

SELECT Subject, Locations.Location, ..... FROM Meetings, Locations WHERE Meetings.Location = Locations.Location_ID

Also make sure that the Location column in the Meetings table and the Location_ID column in the Locations table are of the same type, i.e. integer.

Kiara


0
Princy
Top achievements
Rank 2
answered on 05 May 2008, 10:21 AM
Hi Sinan,

Basically, if the data resides in different datatables, you can use a join/union clause in your select statement and then include the resulting fields in the RadGrid.

Princy.
Tags
Grid
Asked by
Sinan
Top achievements
Rank 1
Answers by
Kiara
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or