Quantcast
Channel: DataSource Controls - SqlDataSource, ObjectDataSource, etc.
Viewing all articles
Browse latest Browse all 956

GridView Lookup

$
0
0

Hi

I’m struggling to find a way to show Parent Category data as the ‘Name’, rather that the CategoryID.

I am using the GridView with a SQLDataSource connection string to retrieve the following information from a database table.

Here is the current output.

<div dir="ltr">
CategoryIDNameParentCategory
01Antiques
02Bikes
03Food
04Biscuits03
05Crisps03
06Banana03
</div>


And the desired output is to be as below.  I have converted the ParentCategory field to a template field, but so far have not able to figure out how to show the ParentCategory Name, and not the CategoryID.

<div dir="ltr">
IDNameParentCategory
01Antiques
02Bikes
03Food
04BiscuitsFood
05CrispsFood
06BananaFood
</div>



Any pointers would be greatly appreciated.

Many Thanks, James


Viewing all articles
Browse latest Browse all 956

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>