Link to home
Start Free TrialLog in
Avatar of stephencushen
stephencushen

asked on

Repeater

hi,

i want to do the following, i have a table with a list of items i want to dispaly on a web page, i have tried to use a repeater like so

<asp:Repeater id="ShowItemList" runat="server" OnItemCommand="ShowItem_ItemCommand">
  <itemTemplate>
    <asp:linkbutton text='<%# DataBinder.Eval(Container.DataItem, "ItemType") %>'  CommandName="ShowItem" runat="server"
                                                                                                                                                                       width="400" />
     <asp:linkbutton text='<%# DataBinder.Eval(Container.DataItem, "ItemType") %>' CommandName="ShowItem" runat="server"                                
                                                                                                                                                                       width="400" />
  </itemTemplate>
</asp:Repeater>

output
------------------------------
Apples             Apples
Oranges          Oranges

but that just displays the same item side by side like above, so i guess im doing something wrong, can i put a piece of code in between the two linkbutton's to jump to the next record? or am i going about this arse-ways?

i would like the output to look like it does below is there an easy way to do this, without having to use 27 select statements and 27 repeaters, one of each for each letter of the alphabet??

A
---------------------------------------------------------------
Apples                        


B
---------------------------------------------------------------
Banans                       Beans
Beetroot                      

C
---------------------------------------------------------------
Corn                          Carrots
.
.
.
.

Thanks In Advance

Avatar of mmarinov
mmarinov

Hi stephencushen,

i suggest you to use for this purpose datalist
aslo it is not possible to move to the next record within the aspx

Regards!
B..M
mmarinov
Avatar of stephencushen

ASKER

heeeeem

ive been messin around with datalists, but cant get them to display results like

<tr>
      <td>aaaaaa</td><td>bbbbbbb</td>
</tr>
<tr>
      <td>ccccccc</td><td>ddddddd</td>
</tr>
<tr>
      <td>eeeeee</td><td>ffffffffffff</td>
</tr>

they only

<tr>
      <td>aaaaaa</td><td>aaaaaa</td>
</tr>
<tr>
      <td>ccccccc</td><td>ccccccc</td>
</tr>
<tr>
      <td>eeeeee</td><td>eeeeee</td>
</tr>

any ideas who to get it to display like i want it??
ASKER CERTIFIED SOLUTION
Avatar of mmarinov
mmarinov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
cheers,

exactly what i was lookin for