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

[Solved] Focus out bug?

2 Answers 87 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Daniel Blendea
Top achievements
Rank 1
Daniel Blendea asked on 01 Mar 2012, 10:00 AM
Hello,
I'm using a NumericTextBox inside a Grid.

// grid column
columns.Bound( ot => ot.Volatility )
        .HtmlAttributes( new { @class = "col-volatility number",
                data_strikePriceId = "0", data_strikeprice = "0" } );
 
// Edit volatility editor template
@(Html.Telerik().NumericTextBox().Name( "Volatility" ).Spinners( true )
                .MinValue( -1 ).MaxValue( 1 )
                .IncrementStep( 0.01 ).DecimalDigits( 2 )
            .ClientEvents( events => events.OnChange( "onChangeVolatilityPerPosition" ))
)

I think there is a bug in the NumericTextBox focus out event.
When I modify its value, then click outside the textbox, anywhere in the page, the OnChange event is not fired.
Also, very strangely, when I click inside the textbox, the textbox' focusin internal event is fired 3 times.

I think this focus out bug is quite bad from usability point of view, many users modify the value, then click elsewhere and expect that value to be updated.

2 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 01 Mar 2012, 11:10 AM
Hello Daniel,

 
I was not able to observe the depicted issue. Check this screencast, which shows that the change event is raised correctly.

Regards,
Georgi Krustev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Daniel Blendea
Top achievements
Rank 1
answered on 01 Mar 2012, 11:38 AM
I agree, in the screencast it works. I tested also in the demos.
But in my case it doesn't work.
Maybe because I don't have defined the Edit command.
Instead, the grid has .Editable( editable => editable.Mode( GridEditMode.InCell ) ),
all columns but Volatility are ReadOnly().

So the user clicks in the Volatility column, enters a value or modifies the existing one,
then clicks outside the grid, or in another Volatility column or directly on a "Calculate" button.

I'm not actually saving the content of the column, it's just a way to add/edit the value in relation to the other fields in the grid.
After the value is changed in the grid, I use it for some other calculations.
Tags
NumericTextBox
Asked by
Daniel Blendea
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Daniel Blendea
Top achievements
Rank 1
Share this question
or