By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,975 Members | 1,216 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,975 IT Pros & Developers. It's quick & easy.

Your opinon please

P: n/a
Hi,

I am writing a shop front for selling goods and want to show the items
in a datagrid/gridview where the headertext is the name, description
and then a variety of prices based on the sizes e.g. Large, Medium,
Small

Name | Description | Large | Medium | Small
=======================================
Shoes | These are nice shoes | 3.20 | 4.20 | 4.50
Obviously this would normally be easy, but I want the different size
text e.g. Large, Medium, Small to come out of the database because
different product categories have different size names.

I have got the database structure sorted but could do with some advice
on the above.

Cheers!

Aug 16 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
what do you actually want to know?

"bungle" <bu****@wizardbuy.comwrote in message
news:11**********************@w3g2000hsg.googlegro ups.com...
Hi,

I am writing a shop front for selling goods and want to show the items
in a datagrid/gridview where the headertext is the name, description
and then a variety of prices based on the sizes e.g. Large, Medium,
Small

Name | Description | Large | Medium | Small
=======================================
Shoes | These are nice shoes | 3.20 | 4.20 | 4.50
Obviously this would normally be easy, but I want the different size
text e.g. Large, Medium, Small to come out of the database because
different product categories have different size names.

I have got the database structure sorted but could do with some advice
on the above.

Cheers!

Aug 16 '07 #2

P: n/a
Bungle,

I think you have better chances posting this question in a database
group/forum (as opposed to a C# newsgroup).

As for your question, you can keep a size index (S = 1, M = 2, L = 3)
in the product table, along with a category for the product. When
selecting the products you could JOIN with a table that keeps the size
names, as uniquely determined by a pair of <size index; product
category>.

For example, that table would have records:

<size index = 1, product category = 1; name = 'Small'>
<size index = 2, product category = 1; name = 'Medium'>
<size index = 3, product category = 1; name = 'Large'>
<size index = 1, product category = 2; name = 'Normal'>
<size index = 2, product category = 2; name = 'Supersized'>
<size index = 3, product category = 2; name = 'King size'>
etc

Aug 16 '07 #3

P: n/a
I think he wants to know how he can change the column header text when
retrieving the datagrid.

Couldn't you retrieve the header text separately then dynamically change
what you need to change?

Brad

ThunderMusic wrote:
what do you actually want to know?

"bungle" <bu****@wizardbuy.comwrote in message
news:11**********************@w3g2000hsg.googlegro ups.com...
>Hi,

I am writing a shop front for selling goods and want to show the items
in a datagrid/gridview where the headertext is the name, description
and then a variety of prices based on the sizes e.g. Large, Medium,
Small

Name | Description | Large | Medium | Small
=======================================
Shoes | These are nice shoes | 3.20 | 4.20 | 4.50
Obviously this would normally be easy, but I want the different size
text e.g. Large, Medium, Small to come out of the database because
different product categories have different size names.

I have got the database structure sorted but could do with some advice
on the above.

Cheers!

Aug 16 '07 #4

P: n/a
Do you mean to DB architecture or to UI/BL structure bound to DB ?
--
Sincerely
Yaron Karni
http://dotnetbible.blogspot.com/
"bungle" wrote:
Hi,

I am writing a shop front for selling goods and want to show the items
in a datagrid/gridview where the headertext is the name, description
and then a variety of prices based on the sizes e.g. Large, Medium,
Small

Name | Description | Large | Medium | Small
=======================================
Shoes | These are nice shoes | 3.20 | 4.20 | 4.50
Obviously this would normally be easy, but I want the different size
text e.g. Large, Medium, Small to come out of the database because
different product categories have different size names.

I have got the database structure sorted but could do with some advice
on the above.

Cheers!

Aug 17 '07 #5

P: n/a
Pls expline yourself ? do you ask on data base strcuture architecture or UI
binded to the DB ?
--
Sincerely
Yaron Karni
http://dotnetbible.blogspot.com/
"bungle" wrote:
Hi,

I am writing a shop front for selling goods and want to show the items
in a datagrid/gridview where the headertext is the name, description
and then a variety of prices based on the sizes e.g. Large, Medium,
Small

Name | Description | Large | Medium | Small
=======================================
Shoes | These are nice shoes | 3.20 | 4.20 | 4.50
Obviously this would normally be easy, but I want the different size
text e.g. Large, Medium, Small to come out of the database because
different product categories have different size names.

I have got the database structure sorted but could do with some advice
on the above.

Cheers!

Aug 17 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.