Hello All,
I'm using the UltraTextEditor in a VB.NET application to display a piece of data that is only editable for new records. After the user has entered the data and it is saved to the database the ReadOnly property of the control is set to true. When this happens the UltraTextEditor gets in a state where it looks like it has an appearance that is a cross between ReadOnly and ReadWrite. If the user clicks on the control the text goes blank, but the appearance appears to be ReadOnly = True and if the user tabs off the control the correct text is then displayed.
Is this some Appearance side affect or is there some other property I need to change or method I need to call after changing the ReadOnly property? I've tried calling the Refresh method on the control with no noticeable affect.
I'm using the Infragistics 14.1 Win CLR4x in VB.Net in Visual Studio 2010.
Thanks,
Dave,
Thanks for the prompt reply.
I wasn't able to make your sample replicate the issue, but it did make me take a closer look at my code. What I did find is the point in my code where the controls appearance was "going wrong". My code is creating a new entity that gets added as a node in UltraTreeView and after the node is created it is selected. After that code ran is when the issue occurs.
I was able to figure out a work around. Here is the code I added that fixed the issue for me:
Frm.ActiveControl = Frm.uteUserName
Frm.uteUserName.Text = sNewUserName
Frm.ActiveControl = Frm.cboTypeOfUser
Frm.uteUserName.Refresh()
Where uteUserName is the UltraTextEditor control and cboTypeOfUser is a custom control that is derived from an UltraComboEditor. I'm not sure why this fixed the problem, but at least I'm good for now. I would have sent my solution but it is rather complex and uses other third party controls and would have taken me more time than I was willing to spend to send an example.
Thanks for the help, even it was mostly to get me to simply take a closer look at my code. I really enjoy working with the Infragistics controls and am impressed with the quick response I got from this forum!
Thanks Again,
Hello Jamie,
Thank you for contacting Infragistics.
I created the attached sample project to test this behavior. When I enter text in the editor and then click the button, the editor switches to ReadOnly mode without any issues.
I'd like you to compare my sample to yours and modify my sample so it reproduces the issue.