views:

10

answers:

0

I need to programatically test and modify a ListView's column values at run time. The data is coming from a LinqDataSource ("LDS") and the LDS is declared to return an ordered subset of the target SQL table's columns.

My inclination was to do this using the ListView's OnItemDataBound event, but at that time the ListViewDataItem is an anonymous object and although I can get its values with

string d = DataBinder.Eval(v, "Description").ToString();

I can't figure out how to stuff revised values back into the anonymous object.

So, my question is - is there a way to do this OnItemDataBound or should I be doing it OnDataBound and if so how?

Any help appreciated!