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

Radnumeric issue when in RadTabstrip

2 Answers 74 Views
Input
This is a migrated thread and some comments may be shown as answers.
Matthew Botting
Top achievements
Rank 1
Matthew Botting asked on 24 Jul 2013, 03:53 AM
Hi Telerik,
I have a rad numeric textbox sitting within a radtabstrip and multipage.
The multipage is set to renderSelectedPageOnly and hence the tabstrip is set to autopostback.

I have found an issue with this however.
If I change the number in the numeric textbox and then switch tabs the new number is lost upon switching back to the original tab.
Viewstate is of course enabled.
If I alter the number, then move the focus to another element prior to switching tabs the change is retained.
I find this to be a big problem and am currently looking at putting a handler to onclienttabselecting to rectify the issue.

Note I have tested this same behaviour against a regular asp:textbox and the change is retained as I would expect.

Regards,
Matt

2 Answers, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 26 Jul 2013, 02:28 PM
Hello Matt,

This happens because the RadNumericTextBox has more complex structure, and the value is not considered as set until an enter key is pressed or the control is blurred. The easier way to resolve the issue is to add client onclick on the tabs and focus some other element of the page, that will cause blur for the inputs and their values will be set.

Regards,
Vasil
Telerik
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 the blog feed now.
0
Matthew Botting
Top achievements
Rank 1
answered on 30 Jul 2013, 02:11 AM
Thanks Vasil,
I do understand the complexity involved, however believe this to be a particularly nasty bug that could go unnoticed in testing and potentially cause data loss.

I have written the following jQuery to select the first visible input button or textbox (that isn't a radnumeric) and have assigned it to OnClientMouseOver. This is not ideal as hovering over the tabstrip will move the focus to another control, however it appears to be too late to use onclienttabselecting as the incorrect behaviour occurs. I do not see a onclientclick in the API doco.

I suppose that I could update the below function to then refocus the initial item
function Unfocus(sender,args){
    $telerik.$("input[type=text]:visible:not(.riTextBox):first,input[type=button]:visible:first").focus();
}

I assume that this has been logged and may be looked at in a future hotfix, or do you require me to submit this via your issue tracking system?

Regards,
Matt
Tags
Input
Asked by
Matthew Botting
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Matthew Botting
Top achievements
Rank 1
Share this question
or