Hi, I need to set a cell value to something dependant on other values which are only available during data binding so I'm using OnItemDataBound but it says I can't set the dataitem value.
Any ideas how to do this?
protected override void OnItemDataBound(RepeaterItemEventArgs e) {
base.OnItemDataBound(e);
DateTime date = (DateTime)DataBinder.Eval(e.Item.DataItem, "date");
string year = String.Format("{0:yyyy}", date);
string month = String.Format("{0:MM}", date);
((DataRowView)e.Item.DataItem)["url"] = "/" + year + "/" + month;
}
Results in the exception:
System.Data.DataException: Cannot set url.