1. Sinan
    Sinan avatar
    1 posts
    Member since:
    May 2008

    Posted 03 May 2008 Link to this post


    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

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

    Location_ID  Location
        1                     loc1
        2                     loc2
    Sinan UYSAL
  2. Kiara
    Kiara avatar
    309 posts
    Member since:
    Jul 2006

    Posted 04 May 2008 Link to this post

    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.


  3. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 05 May 2008 Link to this post

    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.

Back to Top