I created a windows form that has a number of controls on it (mostly textboxes and checkboxes) that are bound to a dataset. I inserted a masked edit box to bind to a phone number field. Once I added that control with the data binding, suddenly, no data appears at all on any control (they are all blank). I remove the binding, and I can see data in the controls again.
So, to test things, I bound a standard textbox to the phone number field, and created a button that, when clicked, would set the text property of the masked edit box to the text property of the phone number text box. When I click, nothing seems to happen. I added a line of code in the button click event to display in a messagebox the text property of the masked edit box after it had been set to the text property of the textbox. The message box displays the phone number!
VB Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click maskPhone.Text = txtPhone.Text MessageBox.Show(maskPhone.Text) End Sub
So, the data is being assigned to the masked edit control's text property, but it isn't being displayed on the form at all. I even set the form to refresh afterward, but the masked edit still only displays the mask. Here are the settings on the masked edit control:
Mask: (###) ###-####
Format: (###) ###-####
Everything else is default settings.
Any ideas out there?
