About itemdatabound

i have this repeater in my page

<asp:repeater id="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
    <table width="100%" class="table">
    <td width="10%" bgcolor="Beige">
    <asp:Label id="lbhora" Runat="server">
    <%# Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "StartTime")).ToShortTimeString() %>
    <td bgcolor="LemonChiffon">
    <asp:LinkButton id="Linkbutton3" runat="Server" CssClass="aa" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"Href") %>' CommandName="Select">
    <%# DataBinder.Eval(Container.DataItem, "Task") %>

as you could see im trying to build a daily schedule. this is working fine.
But. i want to have two events in the same time, together. as this:

10:30  event 1 - event 2 - event 3 (or something like that!)

how can i save the last time binded?
any ideas?

ask me if it is not explained enough!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Well, hi Fluxwire.

You have to create a new repeater inside your main repeater (nestead repeater).
Then, you can add all events you want inside nestead repeater.

Hope this help you.
FLUXWIREAuthor Commented:
The solution is very nice!
I dont know yet how to implement it.

I have a datatable that i use as datasource for my repeater.
this datatable has two columns. the time and the event.
i will put the second repeater in the table cell where i have the events.
this second repeater i will need to bind with a datatable view where i
select events from the same time?

You have to rebuild your dataset schema:
datatableTime (scheduleTimeId,datetime,...)

Then you set the datasource of your master repeater to datatableTime and for the nestead repeater, you set the datasource in itemdatabound event depends on which item is selected, so which time is selected.

Hope you see how to proceed.
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

FLUXWIREAuthor Commented:
I got some examples using two tables with relationship between them.
But in this case i have only one table. like this
12:00 event1
12:30 event2
12:30 event3
12:30 event4
15:00 event5
and so on.
how can i use only this table to put the time in the first repeater and the event name in the second?

sorry. i didnt get it yet!
you have to create two temporary tables:
the first one will contains the datetime and the second one all events with the relationship like in my previous post.
datatableTime (scheduleTimeId,datetime,...)

DataTable datatableTime=new DataTable();
DataColumn dataColumnscheduleTimeId=new DataColumn();
datatableTime.Columns.Add(dataColumnscheduleTimeId); ...

DataTable datatableTimeEvents=new DataTable();
DataColumn dataColumnEventId=new DataColumn();
DataColumn dataColumnscheduleTimeId=new DataColumn();
datatableTimeEvents.Columns.Add(dataColumnscheduleTimeId); ...

DataSet dataSetTemp=new DataSet();
dataSetTemp.Relations.Add(new Relation()); ... (with VS it's easier to define the relation between those tables)

Now, you have your temporary dataset and tables.
This is a summary of how you can proceed.

Then you set the datasource of your master repeater to datatableTime and for the nestead repeater, you set the datasource in itemdatabound event depends on which item is selected, so which time is selected.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FLUXWIREAuthor Commented:
ok. i get it!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.