This is what I did, it is not very good, but will allow you to do
processing.
Example:
On the aspx/ascx page, I would like to retrieve the the date for the the
particular record
so i call a function coded in the aspx.cs/ascx.cs which is GetDate, I will
pass in the record in the datagrid
<%# GetDate(Container.DataItem) %>
On the aspx.cs/ascx.cs, I will process the dataItem, which return the short
date for my datagrid
public string GetDate(Object obj)
{
string topicDate = ((DataRowView)obj)["topicDate"].ToString();
return Convert.ToDateTime(topicDate).ToShortDateString();
}
-----------------------------------------------------------------
If you would like a better and much more professional way, this article
might help
http://openmymind.net/databinding/index.html
Joey
"Tina" <ti**********@removespamexcite.com> wrote in message
news:u9**************@TK2MSFTNGP10.phx.gbl...
I have a datagrid where I specified {0:###,###,###} at design time.
However sometimes I am putting percentages in the grid instead of money and
I want to change the formating to {##%}. I've looked over the docs on such
things as the dataformatstring porperty of the boundColumn but still can't
figure out how to do it in code.
Thank,
T