you can accommodate that in your query (select statement) itself, if it is simple?
else you could change for each item while it is getting bound in the ItemDataBound event but first you'll have to wire up the ItemDataBound event, for example:
<asp:DataGrid id="ItemsGrid" runat="server"
BorderColor="black"
BorderWidth="1"
CellPadding="3"
ShowFooter="true"
OnItemDataBound="Item_Bound"
AutoGenerateColumns="true">
codebehind:
protected void Item_Bound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item | e.Item.ItemType == ListItemType.AlternatingItem) {
DataRowView drv = (System.Data.DataRowView)e.Item.DataItem;
Label lbl = (Label)e.Item.FindControl("Label1");
if (lbl != null)
{
//get data from DataItem and proceed:
lbl.Text = drv["data"].ToString();
}
}
}