Subclassed Devexpress TextEdit not displaying correctly


Author
Message
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)Advanced StrataFrame User (632 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
I have a Subclassed Devexpress TextEdit control, where I want a Numeric Field, displaying 2 decimal points. This does not show the decimal points mask, unless I Click into the control. If the value has zero init , it displays as 0  (Not 0.00). The minute I click into it , or Edit it, it displays correctly. I have tried the same thing with the Devex Control itself dropped on the form, and manually set the Properties (For which I have Code in the Subclass) , and it works fine.

Also, if I set the properties manually on the form in my subclassed control, it also shows the 2 decimals

My subclass code is as follows:

public class dxTextEdit2D : dxTextEdit
{
protected override void OnEnter(EventArgs e)
{
base.OnEnter(e);
this.Properties.Mask.UseMaskAsDisplayFormat = true;
this.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
this.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
this.Properties.EditFormat.FormatString = "###,####,###,##0.00";
this.Properties.DisplayFormat.FormatString = "###,####,###,##0.00";
this.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
this.Properties.Mask.EditMask = "n02";
}
} // End dxTextEditN2


I have also attached a screen shot of whats happening

 


Attachments
SfDx2decimalsNotShowing.png (124 views, 6.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search