MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

List - Alternating Style ?  (Mono Support )

Viewed 26157 time(s), 3 post(s) 8/13/2011 4:38:08 PMby shawndg

Related topics

shawndg

shawndg

8/13/2011 4:38:55 PM
In the List parts..

Is there any css style tags or way to alt rows colors ?

Im trying to make the colors of each row alternate..

I edited the list template but its just one row.. ?
This content has not been rated yet. 
1871 Reputation 252 Total posts
khorvat

khorvat

8/13/2011 7:25:47 PM
Hi,

  we have implemented alternating style functionality in new version of MonoX that we hope to release soon. As a workaround I'll try to provide you with one till Thursday.

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
denis

denis

8/13/2011 9:22:01 PM
Hey Shawn,
Actually there is a quick solution that you can use right away. The "repeating" part of parts such as ListModule is actually a standard ASP.NET ListView. You can always access all of the underlying functionality using something like this:

<MonoX:ListModule runat="server" ID="list1" ListName="Test list">
    <TemplatedControl>
        <LayoutTemplate>
            <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
              
        </LayoutTemplate>
        <ItemTemplate>
            This is my item template. <a href='<%# Eval("ItemUrl") %>'><%# Eval("ItemTitle") %></a><br /><%# Eval("ItemContent") %>
        </ItemTemplate>
        <AlternatingItemTemplate>
            This is my alternatingitem template. <a href='<%# Eval("ItemUrl") %>'><%# Eval("ItemTitle") %></a><br /><%# Eval("ItemContent") %>
        </AlternatingItemTemplate>
    </TemplatedControl>
</MonoX:ListModule>

You will probably want to delete the contents of your template file for this control, as it still works, although you are using the standard ASP.NET data binding syntax.

This content has not been rated yet. 
7207 Reputation 956 Total posts