Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 67103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:12:27+00:00 2026-05-10T19:12:27+00:00

I am working on a co-workers website, and he mistakenly put up a gridview

  • 0

I am working on a co-workers website, and he mistakenly put up a gridview that shows a TypeID instead of the TypeName. I want to put the actual NAME of the type, instead of it’s arbitrary ID number, like he has it. I see he has two ‘ObjectDataSource”s on the page — one for Type and one for Item. Items contains the ID of what TYPE the item is, which is all in the Items datasource. He is pulling this ID to populate the gridview. I want to use that ID to pull the NAME form the other data source, and place that NAME into the gridview for that specific column. Can this be done? Can I use two different datasources on a gridview?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T19:12:27+00:00Added an answer on May 10, 2026 at 7:12 pm

    If i’m understanding this right, what you have is two datasources that do this:

    1) SELECT ID, Item, ItemTypeID FROM Item 2) SELECT ID, ItemType FROM ItemTypes  

    And you’re wanting the Item name and the Item Type displayed in your grid.

    To answer your fundamental question if you can use both sources on the grid: yes. But that’s not the most efficient way to perform the operation, as you’d need to be walking the second datasource for every line in the first.

    A better way would be to join the two datasources together, and only have one.

    Modify the SELECT statement for the first datasrouce to be something along these lines:

    SELECT i.ID, i.Item, t.ItemType FROM Item i INNER JOIN ItemTypes t ON i.ItemTypeId = t.ID; 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a website and I want to make pretty urls. The
I have co-workers working on an Entity Framework model that changes structure (entities), over
I am working on a website that displays some data from DB that changes
I have a blocking queue and workers taking from that queue and then working
I'm working an image processing website, instead of having lengthy jobs hold up the
I'm working on a project involving enlisting a large number of relatively unskilled workers
I'm working on a web application that submits tasks to a master/worker system that
I'm working on a web application. One of my co-workers has written some asp.net
I am working on a game that has AI logic, movement, etc and drawing.
In the project I'm working on, there is a certain form that contains an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.