Your opinon please

  • Thread starter Thread starter bungle
  • Start date Start date
B

bungle

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!
 
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
 
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
 
Pls expline yourself ? do you ask on data base strcuture architecture or UI
binded to the DB ?
 

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

Back
Top