Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Gridview and Relational data

Reply
Thread Tools

Gridview and Relational data

 
 
Saber
Guest
Posts: n/a
 
      04-16-2006
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.


 
Reply With Quote
 
 
 
 
=?Utf-8?B?T3Jlbg==?=
Guest
Posts: n/a
 
      04-16-2006
hi Saber,

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

Oren.

"Saber" wrote:

> 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.
>
>
>

 
Reply With Quote
 
 
 
 
Saber
Guest
Posts: n/a
 
      04-17-2006
Thanks Oren,
OK. I'll do that,
I thought there is an easier way, VS 2005 made us lazy


"Oren" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> hi Saber,
>
> Create a stored procedure with the logic that you need and retrieves it to
> your page.
>
> Oren.
>
> "Saber" wrote:
>
>> 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.
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on what control to use when nesting relational data on a =?Utf-8?B?VG9iaW4=?= ASP .Net 0 11-01-2006 02:11 PM
Relational data to XML - Are there any standards? Pradeep XML 9 09-08-2006 11:51 AM
[ANNOUNCE] DataDirect Technologies Releases DataDirect XQuery to Simplify XML and Relational Data Integration Stylus Studio XML 0 09-20-2005 12:23 PM
JSTL displaying relational data on a JSP Carse Java 1 01-28-2005 09:12 PM
Exporting relational data to xml using java Amol XML 0 04-16-2004 03:45 PM



Advertisments