I have a datagridview control that I load via the program from a stored procedure. I got the grid set up without problem except for one item that being formatting cell data. In the data row I have several phone numbers, cell, fax etc which I want to format/mask to display. I tried a number of attempts to use the cellformatting event and while I get no compile error, the code doesn't work.
Does someone have some sample code I could use to mask the phone numbers for display on the grid?
Thanks,
Tom
ps current non working code:
If Me.dgVendors.Columns(e.ColumnIndex).Name = "VendorPhone" Then
If e.Value IsNot Nothing Then
dgVendors.Columns(e.ColumnIndex).DefaultCellStyle.Format = "(###) ###-####"
End If
End If
Does someone have some sample code I could use to mask the phone numbers for display on the grid?
Thanks,
Tom
ps current non working code:
If Me.dgVendors.Columns(e.ColumnIndex).Name = "VendorPhone" Then
If e.Value IsNot Nothing Then
dgVendors.Columns(e.ColumnIndex).DefaultCellStyle.Format = "(###) ###-####"
End If
End If