gjshah7254
4/7/2015 - 4:27 AM

Transformation Data Item Index (kentico)

Transformation Data Item Index (kentico)

<%# Container.ItemIndex + 1 %>

<%# ((ICollection)repeaterName.DataSource).Count - 1 %>//Counts total number of items in the repeater

<%# DataItemIndex %> //Writes the number of Index that is for the transformation item

<%# DataItemIndex ==0? "First record":"Not first record" %> 

<%# DataItemIndex==DataRowView.DataView.Count-1?"Last record":"Not last record" %>

<%# (DataItemIndex%3)-2==0?"true":"false" %>

<%# (DataItemIndex%6)==0?"<div id=\"wrapper\">":"" %>

<%# (DataItemIndex%6)-5==0 || DataRowView.DataView.Count==(DataItemIndex+1)?"</div>":""

<%# ((1+DataItemIndex)%2)==0?"<div class='even'>":"<div class='odd'" %> //Find whether it is odd or even item in transformation

<asp:Placeholder runat="server" visible='<%# "True".Equals((DataItemIndex) - 4 > 0?"True":"False") %>'>

<%# DataRowView.DataView.Count %> //Count number of rows/items in repeater