im binding a collection to the repeater and in the ItemDataBound object Im filtering a view. I need to somehow append a vaule from the view to the end of a collection record before databinding.
Is there a better way to do this?
private void rptrGroupList_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if ( ( e.Item.ItemType == ListItemType.Item ) || ( e.Item.ItemType == ListItemType.AlternatingItem ) )
{
if ( ( ddlEmployees.SelectedIndex > 0 ) && ( ddlYears.SelectedIndex > 0 ) )
{
TimeOffGroupEntity tofeCurrentItem = ((TimeOffGroupEntity) e.Item.DataItem);
IPredicateExpression peFilter = new PredicateExpression();
peFilter.Add(EmployeeTimeOffTotalsFields.EmployeeId == int.Parse(ddlEmployees.SelectedValue));
peFilter.Add(EmployeeTimeOffTotalsFields.Year == int.Parse(ddlYears.SelectedValue));
peFilter.Add(EmployeeTimeOffTotalsFields.TimeOffGroupId == tofeCurrentItem.TimeOffGroupId);
tvEmployeeTimeOffTotals.Fill(0, null, false, peFilter);
if ( tvEmployeeTimeOffTotals.Rows.Count > 0 )
{
{NEED TO DO THE APPEND HERE?}
}
}
}
}