簡體   English   中英

RadNumericTextBox 使用 Javascript 禁用旋轉按鈕

[英]RadNumericTextBox disable spinbuttons using Javascript

我得到了一個RadNumericTextBox ,其屬性showSpinButtons設置為true ,文本字段本身是只讀的,它是通過使用旋轉按鈕更新的。

但我希望在選中/取消選中復選框時禁用和啟用這些微調按鈕。

或者

通過使用 JS 將set_showSpinButtons屬性設置為 false 來隱藏旋轉按鈕也可以。

但我似乎無法同時管理兩者,我不明白我做錯了什么

<telerik:RadNumericTextBox ID="RadNumericTextBox2" runat="server" MinValue="1" MaxValue="100" MaxLength="3" 
 ShowSpinButtons="True">
   <NumberFormat DecimalDigits="0" ZeroPattern="n" />
</telerik:RadNumericTextBox>

我的JavaScript:

RadNumericTextBox1.set_showSpinButtons(false); //trying everything at this point
RadNumericTextBox2.SpinUpButton.disabled = true;
RadNumericTextBox2.SpinDownButton.disabled = true;
RadNumericTextBox2.SpinUpButton.enabled = false;
RadNumericTextBox2.SpinDownButton.enabled = false;

我通過執行RadNumericTextBox1.disable();解決了它

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM