Monday, March 26, 2012

Populate dataGrid

I would like to have 24 rows (one for each hour - from 0 to 24h).
Than I have some meetings at some hour and different subjects for each
meeting.

So I should have 24 rows, and if there is some meeting at some hour, there
should be displayed that meeting with all subjects in one cell.

I can get data from database in order like that:

hour meeting subject

9 meeting1 subject1
9 meeting1 subject2
9 meeting1 subject3
10 meeting2 subject1

....and so on

My cell should be displayed like this (for hour 9 for example):

| 9 meeting1
| subject1
| subject2
| subject3
_____________
|10 meeting2
| subject1

Every meeting and subjects displayed are links to the page with subject or
meeting.
What should I use? Can I use data grid? If i populate it with my sql data
then I get more than 24 rows.

Is there some idea?

Thank you,
SimonYou can but you will need to do some editing by hand.

To get things in the right format before using the data in the grid.

"simon" <simon.zupan@.stud-moderna.si> wrote in message
news:u5z3t4OtDHA.1060@.TK2MSFTNGP12.phx.gbl...
> I would like to have 24 rows (one for each hour - from 0 to 24h).
> Than I have some meetings at some hour and different subjects for each
> meeting.
> So I should have 24 rows, and if there is some meeting at some hour, there
> should be displayed that meeting with all subjects in one cell.
> I can get data from database in order like that:
> hour meeting subject
> 9 meeting1 subject1
> 9 meeting1 subject2
> 9 meeting1 subject3
> 10 meeting2 subject1
> ...and so on
> My cell should be displayed like this (for hour 9 for example):
> | 9 meeting1
> | subject1
> | subject2
> | subject3
> _____________
> |10 meeting2
> | subject1
> Every meeting and subjects displayed are links to the page with subject or
> meeting.
> What should I use? Can I use data grid? If i populate it with my sql data
> then I get more than 24 rows.
> Is there some idea?
> Thank you,
> Simon
How do you mean to get things in the right format?
Change sql query or check each row in datagrid when creating and move to the
next row if the row for hour 9 for example was already created (that way I
would probably get 24 rows I needed, but still I should design cell
somehow)?

Do you have some example?

Thank you for your answer,
Simon

"Aemca" <Aemca@.none.com> wrote in message
news:OLbI6CPtDHA.2088@.TK2MSFTNGP09.phx.gbl...
> You can but you will need to do some editing by hand.
> To get things in the right format before using the data in the grid.
>
>
> "simon" <simon.zupan@.stud-moderna.si> wrote in message
> news:u5z3t4OtDHA.1060@.TK2MSFTNGP12.phx.gbl...
> > I would like to have 24 rows (one for each hour - from 0 to 24h).
> > Than I have some meetings at some hour and different subjects for each
> > meeting.
> > So I should have 24 rows, and if there is some meeting at some hour,
there
> > should be displayed that meeting with all subjects in one cell.
> > I can get data from database in order like that:
> > hour meeting subject
> > 9 meeting1 subject1
> > 9 meeting1 subject2
> > 9 meeting1 subject3
> > 10 meeting2 subject1
> > ...and so on
> > My cell should be displayed like this (for hour 9 for example):
> > | 9 meeting1
> > | subject1
> > | subject2
> > | subject3
> > _____________
> > |10 meeting2
> > | subject1
> > Every meeting and subjects displayed are links to the page with subject
or
> > meeting.
> > What should I use? Can I use data grid? If i populate it with my sql
data
> > then I get more than 24 rows.
> > Is there some idea?
> > Thank you,
> > Simon

0 comments:

Post a Comment