I have an ASP.NET data repeater. This is currently set to a data source obtained from an SQL query, as follows:
IDataReader dr = GetData(sql);
myRepeater.DataSource = dr;
myRepeater.DataBind();
This works fine, but what I want to do now is to call a web service, passing all the data returned from the SQL query and make that available to the repeater as well. So, my question is, can I manipulate the data reader object before it is bound, or the data repeater afterwards in order to achieve this; for example:
IDataReader dr = GetData(sql);
var extraData = CallWS(dr);
foreach (MyData d in extraData)
{
dr.AddField(d.Value);
}
myRepeater.DataSource = dr;
myRepeater.DataBind();