Gridview and Relational data

S

Saber

I've two tables in SQL Server 2000:

tblAds: ADid (PK), ADname, ADcatID
tblCategories: CatID (PK), CatName

and some data for example:

tblAds
^^^^^^
1,intel,3
2,amd,3
3,sony,5
4,toshiba,5


tblCategories
^^^^^^^^^^
1,food
2,travel
3,computer
4,application
5,tv

I've a GridView and I want when binding tblAds in GridView,
the user see:
1,intel,computer instead of 1,intel,3
of course there is a relationship from tblAds(ADcatID) to
tblCategories(CatID) but I don't know
how to show that in GridView and also be able to delete and update.
I have to do some hard coding or there is a solution in VS 2005 wizards?

Thanks
Saber S.
 
G

Guest

hi Saber,

Create a stored procedure with the logic that you need and retrieves it to
your page.

Oren.
 
S

Saber

Thanks Oren,
OK. I'll do that,
I thought there is an easier way, VS 2005 made us lazy ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top