Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Datagridview cell specific custom mask

$
0
0

I have a table named ContactInformation which holds customer phone numbers (cell, home, work, etc.) and email(s).  It has three columns, "Type" (1 = home phone, 2 = cell, 3 = work, 4 = email, etc.) and "Description" and "Notes".

 

I have the "Type" column in the datagridiew as a combobox.  What I want to do is have the "Description" cell display a mask textbox depending on the value in the "Type" cell for that row.  So if the "Type" is 1, 2, or 3 then the "Description" cell displays a mask for a phone number (###) ###-####.  If the "Type" is a 4 then the "Description" cell does not have a mask.

 

I know how to add a column with a mask text box, but I want the mask to be cell specific based on the value in a different column on the same row.

 

Suggestions?

 


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>