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. 2 1226
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.
Thanks Oren,
OK. I'll do that,
I thought there is an easier way, VS 2005 made us lazy ;)
"Oren" <Or**@discussions.microsoft.com> wrote in message
news:32**********************************@microsof t.com... 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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: s.gregory |
last post by:
My page layout is like this:
Page
>DataList (databound using ObjectDataSource1 contained in page)
>>Items
>>>UserControl
>>>>GridView (databound using another ObjectDataSource2 contained in...
|
by: Congero |
last post by:
I'm trying to find a way to bind hierarchical data to a gridview control.
I've been able to do this with some third party controls and was wondering if
this functionality is available with the...
|
by: Dabbler |
last post by:
I need to convert a CompanyId in one table to Company Name from another
table for an ItemTemplate. I thought I would just add another SqlDataSource
but not sure how to eval with the CompanyId...
|
by: H5N1 |
last post by:
Hi there
It seems I've spotted interesting problem in a job I've got to do.
I have 3 tables: meals, employees, and intersecting table:
meals_for_employees with bool field meaning, that given...
|
by: ack95 |
last post by:
Simply question
How can I DataBind() a DataViewManager to a GridView in ASP.NET?
Question in Detail
We have a DataSet with relational DataTables (total of 5). We are
generating emails with...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |