In MOSS you can use some of the included Controls for your own purpose. As example the GridView –> SPGridView.
For a good explanation look here –> http://www.sharepointblogs.com/wirkus/archive/2008/08/21/how-to-professionelle-datenanzeige-mit-dem-control-spgridview.aspx [GERMAN]
However some features from the big brother – the ASP.Net Gridview – are not implemented on the SPGridview. For example the DataFormat Property.
So you have to rebuild this on your own. This is done with the RowDataBound Event.
But there is a ugly bug (or is it even a feature…?). If you want to get the current Text of a row with “e.Rows.Cells[index[.text” it gives you nothing back. But you can write in this property and is used……
For a workaround convert the row into DataRowView Object. See example (you have to adopt it for your use….)
void spg_RowDataBound(object sender, GridViewRowEventArgs e)
if (e.Row.RowType == DataControlRowType.DataRow)
DataRowView rowView = ((DataRowView)(e.Row.DataItem));
if (DateTime.TryParse(rowView.Row.ItemArray[index].ToString(), out date))
e.Row.Cells[index].Text = rowView.Row.ItemArray[index].ToString() + " / " + date.ToString("dd.MM.yyyy");