[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 356
  • Last Modified:

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

0
stephencushen
Asked:
stephencushen
  • 2
  • 2
1 Solution
 
mmarinovCommented:
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
0
 
stephencushenAuthor Commented:
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??
0
 
stephencushenAuthor Commented:
cheers,

exactly what i was lookin for
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now