You can do this by making use of the DataItemIndex property.
 
The following example will create an opening div tag that uses a different class for odd and even items:
 
<%-- Add one to zero-indexed DataItemIndex --%>
<%# ((1+DataItemIndex)%2)==0?"<div class='even'>":"<div class='odd'" %>

 
See the following Knowledgebase article for more details on special properties available in transformations:
Using special item data in transformation
 
-ag-
 
 
0 ratings
Sitemap | Content Management System | E-commerce Software | Social Networking Software | Intranet | Online Marketing Solution | Copyright © 2004-2013 Kentico Software | Powered by Kentico CMS