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

Textchanged

9 Answers 199 Views
Input
This is a migrated thread and some comments may be shown as answers.
OPL
Top achievements
Rank 1
OPL asked on 04 Feb 2011, 03:23 PM
Hi,

I've 2 radnumerictextbox ( A & B )  in a row in grid.
Each one have dictinct textchanged event functions (FunctionA & FunctionB)

When i modify B, FunctionB is fired. FunctionB modify the value of A.
If i modify again B, functionA is fired instead of FunctionB.

Is there a way to cancel this event after modification in code behind ?

Thanks

OPL

9 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Feb 2011, 06:36 AM
Hello,


If you do not want to fire "OnTextChanged" event, then set the AutoPostBack property of RadNumericTextBox to "false".



-Shinu.
0
OPL
Top achievements
Rank 1
answered on 07 Feb 2011, 08:57 AM
Hi Shinu,

I need to keep "ontextchanged" and autopostback to true.

I try this :

Function A_textChanged(ByVal sender As Object, ByVal e As EventArgs)
    RemoveHandler B.TextChanged, AddressOf B_TextChanged
    .....
    B.value = "test"
    ......
    AddHandler B.TextChanged, AddressOf B_TextChanged
End Function

but it don't work.

Thks for help.

OPL
0
OPL
Top achievements
Rank 1
answered on 09 Feb 2011, 06:10 PM
Anybody ?
0
Martin
Telerik team
answered on 10 Feb 2011, 01:16 PM
Hello OPL,

Could you please try to change the RadNumericTextBox controls with standard asp TextBox controls and verify whether the same behavior is expected? Let me know about what your findings are.

Kind regards,
Martin
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
OPL
Top achievements
Rank 1
answered on 10 Feb 2011, 03:03 PM
Hi Martin,

I've tried with standard ASP textbox without reproducing the problem.

Any idea ?

I also have a problem when i press enter key, the function attached to Ontextchanged is fired two times (i'm a in radgrid)

Thanks
0
OPL
Top achievements
Rank 1
answered on 11 Feb 2011, 12:13 PM
Hi Martin,

I think my trouble happen when i put a data which have a different format than describe for the radnumerictextbox.
For example :

radnumerictextbox RTBA with option NumberFormat-DecimalDigits="2"
RTBA.value = "5.897867"
if i focus on RTBA and leave it without changing value, the "ontextchanged" is anyway fired.

I modifie in code behind for format data instead of radnumerictextbox and it's ok

I still have trouble when i press enter on my textbox after chage value. The event "ontextchanged" is fired two times

Thanks for helping me, it's quite hurry

OPL
0
Martin
Telerik team
answered on 11 Feb 2011, 01:41 PM
Hello OPL,

With regard to:

"For example :

radnumerictextbox RTBA with option NumberFormat-DecimalDigits="2"
RTBA.value = "5.897867"
if i focus on RTBA and leave it without changing value, the "ontextchanged" is anyway fired.
"


I am afraid that this is a limitation of the control that is observed on initial load only. The only available workaround currently is to set NumberFormat-KeepNotRoundedValue="true" of your RadNuemricTextBox.

As to:

"I still have trouble when i press enter on my textbox after chage value. The event "ontextchanged" is fired two times"

Indeed the reported behavior is observed for RadNumericTextBox even when the controls are outside of a grid. The strange thing is that although it looks like the event is fired twice, the value of the text box is changed only once. Anyway, I have forwarded your report to our developers for further investigation. Unfortunately, I can not provide you with exact estimate about when the problem will/can be fixed. However, you can follow the status of the issue in our public issue tracking system.

Regards,
Martin
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
RichJ
Top achievements
Rank 1
answered on 20 May 2012, 12:30 AM
Was this ever fixed?  I'm having the same issue with the latest version...

Damn annoying.
0
Martin
Telerik team
answered on 23 May 2012, 08:55 AM
Hello VaticNZ,

The first problem (TextChanged fired on Focus-Blur without changing the value) is resolved in the Q2 2012 release (expected in the beginning of June). To verify that the control works as expected in your scenario, you can try the BETA version of the Q2 release. It should be available for download later today or tomorrow.

The second problem is already resolved.

I hope this helps.

Kind regards,
Martin
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Input
Asked by
OPL
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
OPL
Top achievements
Rank 1
Martin
Telerik team
RichJ
Top achievements
Rank 1
Share this question
or