This is a migrated thread and some comments may be shown as answers.

RadMaskedNumericInput double click.

1 Answer 49 Views
MaskedInput (Numeric, DateTime, Text, Currency)
This is a migrated thread and some comments may be shown as answers.
Konrad
Top achievements
Rank 1
Konrad asked on 06 Dec 2016, 06:24 PM

I have problem with something I would call double (mean second) click on DataColumn I have to edit. The problem is that when I click on it first time I got following edit possibility:

https://i.stack.imgur.com/DRNoh.png

 

And it is way i want to edit value. But there is another way to edit it and I don't know how to disable that possiblity, when you click second time on that element, or you click twice on place without number you get fallowing edit space:

 

 

https://i.stack.imgur.com/zW6zz.png

 

When I have 0 value it behaves like on this picture above, when I have there anything else it display: "80.1600" or "2.00" 

How can I disable it?

Here is code:

<telerik:GridViewDataColumn Header="{Binding Source={x:Static properties:Resources.Discount},Converter={StaticResource StringAddPercentAtEndCoverter}}"
    MinWidth="60" IsCellMergingEnabled="False"
    IsFilterable="False" IsSortable="False" ShowDistinctFilters="False"
    DataMemberBinding="{Binding Discount, StringFormat='n0'}">
<telerik:GridViewDataColumn.CellTemplate>
    <DataTemplate>
        <telerik:RadMaskedNumericInput Value="{Binding Discount, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"
           Mask="" Placeholder="" FormatString="n0" SelectionOnFocus="Default"
           maskedInput:MaskedInputExtensions.Minimum="0"
           maskedInput:MaskedInputExtensions.Maximum="100"
           BorderThickness="0" Background="Transparent"
           IsClearButtonVisible="False" HorizontalAlignment="Right"/>
    </DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 09 Dec 2016, 10:58 AM
Hello Konrad,

Thank you, provided additional information.

Looking at the provided code snippet we can see that you have placed the RadMaskedNumericInput control in the CellTemplate. In your case, you can try placing the mask in a CellEditTemplate. This way you will be able to modify it when the cell is in an edit mode. You can take a look at the Setting CellTemplate and CellEditTemplate help article in RadGridView documentation for further information.

Regards,
Dinko
Telerik by Progress
Telerik UI for WPF is ready for Visual Studio 2017 RC! Learn more.
Tags
MaskedInput (Numeric, DateTime, Text, Currency)
Asked by
Konrad
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or