A few ways to go, but I like from within the databinding expression something
like MyFormatter(myString), where MyFormatter is a public method on the page
that takes a string, runs code to do the formatting, and returns the
formatted string. Or, if the datasource for the grid is your own collection,
you can add a public readonly property to the collection, e.g.
MyFormattedString, which returns the string the way you want it. Finally, if
your input string is numeric and is always in the same format, you can use a
custom numeric formatting string.
"Dexter" wrote:
Hello all,
I have a DataGrid in my Web Application, and it contains a column that i
need to format.
The data is 03856219000126 and i need to show as 03.856.219/0001-26.
Somebody can help me with this?
Thanks
Dexter