MaskedNumericInput ComptyContent dosent work with<Value> tag expened

0 Answers 43 Views
MaskedInput (Numeric, DateTime, Text, Currency)
ofir
Top achievements
Rank 1
ofir asked on 01 Feb 2023, 04:13 PM

I have this property

private double? _netFreqValue;
public double? NetFreqValue
{
    get => _netFreqValue;
    set
    { 
        if(_netFreqValue == value) return;
        _netFreqValue = value;
        this.OnPropertyChanged();
    }
}

and im trying to set the EmptyContent property to nothing(empty string) when the value is null

this works fine

<RadMaskedNumericInput
    Mask = "#4.3"
    AllowInvalidValues = "False"
    EmptyContent = ""
    UpdateValueEvent = "LostFocus"
    Value = "{Binding NetFreqValue, Mode=TwoWay, UpdateSourceTrigger = PropertyChanged}" />

but this does not

<RadMaskedNumericInput

    Mask = "#4.3"
    AllowInvalidValues = "False"
    EmptyContent = ""
    UpdateValueEvent = "LostFocus">
    <RadMaskedNumericInput.Value>
        <Binding Path=""NetFreqValue"
                         UpdateSourceTrigger="PropertyChanged"
                          Mode="TwoWay">
            <Binding.ValidationRules>
              //some validations
             </Binding.ValidationRules>
        </Binding>
      </RadMaskedNumericInput.Value>
</RadMaskedNumericInput>

how can i solve it?
thanks
Martin Ivanov
Telerik team
commented on 06 Feb 2023, 12:59 PM

I've tested the posted code, but it works as expected on my side. You can check this in the attached project.

No answers yet. Maybe you can help?

Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
ofir
Top achievements
Rank 1
Share this question
or