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

RadNumericTextBox Always Zero and RadWindow JS Issue

1 Answer 89 Views
Input
This is a migrated thread and some comments may be shown as answers.
Jeff Reinhardt
Top achievements
Rank 1
Jeff Reinhardt asked on 14 Dec 2010, 08:12 PM
I have two issues with a RadNumericTextbox and a JS error in a RadWindow.

RadNumericTextBox:

<

 

telerik:RadNumericTextBox ID="radtxtConsolePrice" MinValue="0" MaxLength="7" NumberFormat-DecimalDigits="2" NumberFormat-AllowRounding="false" NumberFormat-DecimalSeparator="." NumberFormat-KeepTrailingZerosOnFocus="true" runat="server" TabIndex="1" Width="200px" />

 

In Page_Command:

fgs.ConsolePrice =

Decimal.Round(Utils.ToDecimal(radtxtConsolePrice.Text), 2);

 

This is returning ZERO no matter what value I enter into the box. It is the only input control in the form.

After reading the NumericTextBox and saving the value, I am trying to close the window and rebind my grid on the opener.

ClientScript.RegisterStartupScript(Page.GetType(),

"mykey", "CloseAndRebind();", true);

 

function

 

CloseAndRebind(args) {

 

GetRadWindow().BrowserWindow.refreshGrid(args);

GetRadWindow().close();

}

On Opener:

function

 

refreshGrid(arg){

 

 

if(!arg)

 

{

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");

 

}

 

else

 

{

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");

 

}

}


Error:   htmlfile: Unexpected call to method or property access.

The bold line below is where it breaks.

case

 

Telerik.Web.UI.SelectionOnFocus.SelectAll:this.selectAllText();

 

break

 

;

 

default

 

:this.set_caretPosition(0);

 

break

 

;

 

}},_isInVisibleContainer:

function(a){var b=a;

 

while

 

((typeof(b)!="undefined")&&(b!=null)){if(b.disabled||(typeof(b.style)!="undefined"&&((typeof(b.style.display)!="undefined"&&b.style.display=="none")||(typeof(b.style.visibility)!="undefined"&&b.style.visibility=="hidden")))){return false;

 

}

if(typeof(b.parentNode)!="undefined"&&b.parentNode!=null&&b.parentNode!=b&&b.parentNode.tagName.toLowerCase()!="body"){b=b.parentNode;

 

}

else{return true;

 

}}

return true;

 

},_applySelection:

function(){if(!this._isInVisibleContainer(this._textBoxElement)){return;

 

}

var a=this;

 

if

 

((Sys.Browser.agent==Sys.Browser.Opera)||!document.selection){this._textBoxElement.selectionStart=a._selectionStart;

 

this

 

._textBoxElement.selectionEnd=a._selectionEnd;

 

return

 

;

 

}

this._textBoxElement.select();

 

sel=document.selection.createRange();

sel.collapse();

sel.moveStart(

"character",this._selectionStart);

 

sel.collapse();

sel.moveEnd(

"character",this._selectionEnd-this._selectionStart);

 

sel.select();

},_clearHiddenValue:

function(){this._hiddenElement.value="";

 

this

 

._setValidationField("");

 

},_handleWheel:

function(a){},_setHiddenValue:function(a){if(a==null){a="";

 

}

if(this._hiddenElement.value!=a.toString()){this._hiddenElement.value=a;

 

}

this._setValidationField(a);

 

return

 

true;

Here is the HTML TEXT from the sel:

"<DIV
style="Z-INDEX: 9504; POSITION: absolute; WIDTH: 350px; DISPLAY: none; HEIGHT: 250px; VISIBILITY: hidden; TOP: 279px; LEFT: 409px"
id=RadWindowWrapper_ctl00_radwinConsolePrice
class="RadWindow RadWindow_Default rwNormalWindow rwTransparentWindow"
unselectable="on">
<TABLE style="HEIGHT: 211px" class=rwTable cellSpacing=0 cellPadding=0>
<TBODY>
<TR class=rwTitleRow>
<TD class="rwCorner rwTopLeft">&nbsp;</TD>
<TD style="CURSOR: move" class=rwTitlebar>
<DIV class=rwTopResize></DIV></TD></TR></TBODY></TABLE></DIV>"

not sure if it is relevant but it seems to be doing a select, and this text has unselectable="on"  ?? 

 

1 Answer, 1 is accepted

Sort by
0
Jeff Reinhardt
Top achievements
Rank 1
answered on 14 Dec 2010, 09:25 PM
I found a bug causing the 0 issue, you can close this issue, I am going to move my RadWindow Issue which appears to be IE only to the correct forum.
Tags
Input
Asked by
Jeff Reinhardt
Top achievements
Rank 1
Answers by
Jeff Reinhardt
Top achievements
Rank 1
Share this question
or