【发布时间】:2019-03-14 03:16:06
【问题描述】:
我有一个 radlistbox 我想清除 radlistbox 项目。我试过这段代码,但没有按预期工作。有人能给我一个想法,我该怎么做。
谢谢。
<telerik:RadListBox RenderMode="Lightweight" runat="server" AllowReorder="True" AllowDelete="true" ID="RadListBox1" Height="200px" Width="230px" AutoPostBack="false" ButtonSettings-AreaWidth="35px">
<ButtonSettings Position="Right" AreaWidth="35px"></ButtonSettings>
</telerik:RadListBox>
脚本:
function ClearListbox()
{
var listBox = $find('<%=RadListBox1.ClientID%>');
listBox.trackChanges();
listBox.clearSelection();
listBox.commitChanges();
}
【问题讨论】:
标签: javascript telerik