Last post Dec 02, 2010 08:06 AM by sjnaughton
Dec 01, 2010 12:22 PM|dorao|LINK
I'm new to asp.net and c#, and have been going through the "ASP.NET Dynamic Data" videos on this site. I understand how to change the display format of numbers and dates, but how would I apply a regexps to a string for a specific column?
How can I do something like this?
public class RandomMetaData
[DisplayFormat(DataFormatString="s/\d//g")] public object StringIWantNumbersRemoved;
Dec 01, 2010 07:27 PM|sjnaughton|LINK
I'm not sure what the string
Dynamic Data 4
Dec 01, 2010 11:30 PM|dorao|LINK
substitute all digits with '', globally. E.g. a1b2c3 => abc.
Doesn't really matter what the regular expression is though, just wanted to know how apply a rule make a given column's values display more friendly.
Dec 02, 2010 08:06 AM|sjnaughton|LINK
Hi Dorao, there is not an option to format with regular expression using that method, I would create a new Attribute and apply it in the relative field template to get the effect you want.