Re: DataGrid boundcolumn problem
From: tshad (tscheiderich_at_ftsolutions.com)
Date: 10/20/04
- Next message: Luis Esteban Valencia: "Re: How to populate dropdown list from database?"
- Previous message: Luis Esteban Valencia: "Re: How to populate dropdown list from database?"
- In reply to: Eliyahu Goldin: "Re: DataGrid boundcolumn problem"
- Next in thread: Eliyahu Goldin: "Re: DataGrid boundcolumn problem"
- Reply: Eliyahu Goldin: "Re: DataGrid boundcolumn problem"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 20 Oct 2004 09:34:06 -0700
"Eliyahu Goldin" <removemeegoldin@monarchmed.com> wrote in message
news:%23fale5ntEHA.820@TK2MSFTNGP12.phx.gbl...
> Tom,
>
> If I understand you correctly, you want to show one record field per line.
> For this you can bind you datagrid (or datalist as Ken has noted) to a
> dataset with a table that will have records with one field only. You can
> convert your original records to this new table either in a stored
> procedure
> or in the code. In the latter case you will have to get the original table
> in a dataset first, loop through the records and add every field with a
> value to your new table as a separate row. Then bind the datagrid/datalist
> to the new table.
Are you talking about doing this just for the ASP page?
I assume you are talking about just getting rid of the old table completely
and create 2 (normalize).
CREATE TABLE [dbo].[ScreenQuestions] (
[PositionID] [int] NOT NULL ,
[Unique] [int] NOT NULL ,
[Question] [text] NULL ,
[QuestionType] [char] (10) NULL ,
[Answer1] [text] NULL ,
[Answer2] [text] NULL ,
[Answer3] [text] NULL ,
[Answer4] [text] NULL ,
[Answer5] [text] NULL ,
[Answer6] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
and change it to 2 tables:
CREATE TABLE [dbo].[ScreenQuestions] (
[PositionID] [int] NOT NULL ,
[Unique] [int] NOT NULL ,
[Question] [text] NULL ,
[QuestionType] [char] (10) NULL ,
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
CREATE TABLE [dbo].[ScreenAnswers] (
[PositionID] [int] NOT NULL ,
[Unique] [int] NOT NULL ,
[Unique2] [int] NOT NULL,
[Answer] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
I was trying to get away from that, if possible.
At this point, I haven't got much data in the tables, as I am just starting
to set this up.
Thanks,
Tom
>
> Eliyahu
>
> "tshad" <tscheiderich@ftsolutions.com> wrote in message
> news:OCseaojtEHA.3972@TK2MSFTNGP15.phx.gbl...
>> I want to use a datagrid with my display, but I don't want to use 1 row
> per
>> record.
>>
>> What I have is a record with up to 6 values -
>> (answer1,answer2,answer3,answer4,answer5,answer6). I want to display
>> them
>> with alternating styles. One record may only have the first 3 fields
>> with
>> data and another with 4 and still another with 6.
>>
>> I want it to show as:
>>
>> Answer1
>> Answer2
>> Answer3
>>
>> or
>>
>> Answer1
>> Answer2
>> Answer3
>> Answer4
>> Answer5
>>
>> Can I set up a DataGrid this way?
>>
>> Thanks,
>>
>> Tom
>>
>>
>>
>
>
- Next message: Luis Esteban Valencia: "Re: How to populate dropdown list from database?"
- Previous message: Luis Esteban Valencia: "Re: How to populate dropdown list from database?"
- In reply to: Eliyahu Goldin: "Re: DataGrid boundcolumn problem"
- Next in thread: Eliyahu Goldin: "Re: DataGrid boundcolumn problem"
- Reply: Eliyahu Goldin: "Re: DataGrid boundcolumn problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|