SF DevExpress TextEdit - Percent can't store value


Author
Message
Chan
Chan
Advanced StrataFrame User (683 reputation)Advanced StrataFrame User (683 reputation)Advanced StrataFrame User (683 reputation)Advanced StrataFrame User (683 reputation)Advanced StrataFrame User (683 reputation)Advanced StrataFrame User (683 reputation)Advanced StrataFrame User (683 reputation)Advanced StrataFrame User (683 reputation)Advanced StrataFrame User (683 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I am using SF DevExpress textEdit, with editmask set to 'P' and masktype to numeric. When I edit value in the control and lost focus, SF Dev Textedit doesn't store my value. It reverted back to previous value.

I did try to use DevExpress textedit directly, and it works without problem.

Do you think it is a bug in SF.NET?

Thank you

StrataFrame Team
S
StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
What is the BindingProperty on the textbox?  If it's Text, then it could be that the value in the textbox cannot be converted into the data type to which the control is bound.  (i.e.: if the value in the textbox is 1,000 it cannot be converted to a System.Int32 because of the comma).
dgsoft
dgsoft
StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
I have absolutely the same problem. The value is revert (set of bo property does not happens)



Me.Properties.Mask.EditMask = "P0"

Me.Properties.Mask.MaskType = Mask.MaskType.Numeric

Me.Properties.DisplayFormat.FormatString = "P0"

Me.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric

Me.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far

Me.Properties.Mask.UseMaskAsDisplayFormat = True



What is solution for this problem?
dgsoft
dgsoft
StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Ok. answer found by my own
Edhy Rijo
E
StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
dgsoft (01/26/2010)
Ok. answer found by my own




Would you mind posting the answer? Cool

Edhy Rijo

dgsoft
dgsoft
StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)StrataFrame User (135 reputation)
Group: StrataFrame Users
Posts: 93, Visits: 236
Hi,

As Ben Chase wrote before the problem happens because as default BindingProperty set to "Text", but for correct work it must be set to "EditValue"

Here is a code what made good percent textbox ready Smile



' DataSource Part

Me.textbox.BindingField = "manufacturer_mwst"

' BindingProperty is important!

Me.textbox.BindingProperty = "EditValue"

Me.textbox.BusinessObject = Me.Bbay_manufacturerBO1

Me.textbox.BusinessObjectEvaluated = True



' Mask Part

Me.textbox.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far

Me.textbox.Properties.Mask.EditMask = "P0"

Me.textbox.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric

Me.textbox.Properties.Mask.UseMaskAsDisplayFormat = True



Denis

Edhy Rijo
E
StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Thanks Denis.

Edhy Rijo

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