I have a nested ListView control and within the ItemTemplate I need to make a call to a method in the code-behind file in order to apply a different CSS class to the final row in the rendered table.
I am calling the method as follows...
<td class="<%# GetClass(Container) %>">
Container gives me the ListViewDataItem that is being bound so I was thinking that I can check this item against the list view data source to see if it is the last item in the data source, but how do I get to the data source of the nested control?
Is there a better way of achieving this, I know it could be done with jquery but I was hoping for a C#/ASP.net solution. Thanks.