You should be able to accomplish this through the use of a GridViewMaskBoxColumn. Once you have this column in place for your specific field that contains the numeric values of the phone numbers, use the following settings:
but what happens that it is not compulsory that each time I will have 14 digit no
so some time no may be of 10 digit
at that time the output comes like this:
look at this example:
I want to format it like this: (908) 123-4567Ext.89
I am using following code: CDbl(ContactPhone).ToString("(###) ###-####'Ext'.####") or (your format string in grid)
But I get output like this:(9) 081 2345Ext.6789
Can help me in this????
answered on 05 Jan 2010, 02:38 PM
Hello parag patel,
Please, see our Demo application. There you can find a sample demonstrating GridViewMaskBoxColumn and phone number formats -- GridView->Columns->Column Types. Do not hesitate to contact us again if you have any other questions.