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

Decimal User Input

6 Answers 73 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Richard Harrigan
Top achievements
Rank 1
Richard Harrigan asked on 28 Feb 2011, 02:16 AM
Hi,

I have a grid column that is type Decimal with a currency DataFormatString. When I try to filter on that column it does not allow me to enter a decimal point.  I saw in the first look demo that it works. Any ideas?

Thanks
Rich

6 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 28 Feb 2011, 09:59 AM
Hi Richard Harrigan,

We are a little bit confused.

Are you referring RadGridView column filtering or RadDataFilter, because you mention a grid column and the support ticket category is RadDataFilter? Let us know which one is it.

Best wishes,
Ross
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Richard Harrigan
Top achievements
Rank 1
answered on 28 Feb 2011, 02:46 PM
My problem is with the DataFilter which uses as it's source RadGridView.
RadDataFilter.Source = RadGridView.Items

Thanks
Rich
0
Rossen Hristov
Telerik team
answered on 28 Feb 2011, 03:47 PM
Hello Richard Harrigan,

In this case can you try the following.

1. Attach to the EditorCreated event of RadDataFilter.
2. In the event handler, check the name of the property for which the editor has been created.
3. In case this is your decimal property, cast the editor to RadMaskedTextBox and set its mask to "f". Something like this:

void radDataFilter_EditorCreated(object sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e)
{
    if (e.ItemPropertyDefinition.PropertyName == "MyDecimalProp")
    {
        var editor = e.Editor as RadMaskedTextBox;
        if (editor != null)
        {
            editor.Mask = "f";
        }
    }
}

Meanwhile, I will fix this so that the default editor is created with the "f" mask by default when the type of the property is decimal.

I hope this helps.

Kind regards,
Ross
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Richard Harrigan
Top achievements
Rank 1
answered on 28 Feb 2011, 06:28 PM
Worked great!

Thanks
Rich
0
Niranjan
Top achievements
Rank 1
answered on 08 Mar 2011, 09:13 AM

I am using the following RadMaskedTextBox.

<

 

 

telerik:RadMaskedTextBox MaskType="Numeric" Mask="c" EmptyContent="Some vaule"

When i enter values inside the textbox it is formatted in the Currency format say $37.00. But when i delete the values i am getting $0.00 and the value of the textbox is set to this. Will the values not be deleted on pressing backspace and Null value set when all the entries are deleted.

Also when the textbox is having only the EmptyContent and when i straight away enter .(decimal point), I am getting Object Reference not to set to instance of the Object.

Is there something that i am missing?

0
Alex Fidanov
Telerik team
answered on 11 Mar 2011, 09:11 AM
Hi Richard Harrigan,

The masked text box does not support null values, so you will not be able to delete the value inside it completely. It will default to 0.00 instead. The second issue is a known one. You can try the new RadMaskedCurrencyInput control where these scenario is covered.

Greetings,
Alex Fidanov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
DataFilter
Asked by
Richard Harrigan
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Richard Harrigan
Top achievements
Rank 1
Niranjan
Top achievements
Rank 1
Alex Fidanov
Telerik team
Share this question
or