【发布时间】:2015-09-03 14:39:17
【问题描述】:
如何在asp:Button 点击时打开DropDown 的RadComboBox? RadComboBox 和 Button 都在 EditItemTemplate 的 RadGrid 中。
我的要求是:我必须通过单击按钮(HTML 代码下面的“btnSearch”)打开 RadComboBox 的下拉菜单(HTML 代码下面的“ddlAccountCode”)。
下面是RadComboBox和Button的HTML代码
<telerik:GridTemplateColumn UniqueName="AccountCode" HeaderText="Account Code">
<ItemTemplate>
<asp:Label ID="lblAcCode" runat="server" Text='<%# Eval("AccountCode")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblAcCode2" runat="server" Text='<%# Eval("AccountCode") + " - " + Eval("AccountDescription")%>' Visible="false"></asp:Label>
<telerik:RadComboBox ID="ddlAccountCode" runat="server" Height="200" Width="240" DropDownWidth="310" HighlightTemplatedItems="true" CausesValidation="true"
OnItemsRequested="ddlAccountCode_ItemsRequested" EnableItemCaching="true" ShowDropDownOnTextboxClick="false" EnableLoadOnDemand="True" ShowMoreResultsBox="true" EnableVirtualScrolling="true" MarkFirstMatch="True" AllowCustomText="true"
Filter="Contains" AppendDataBoundItems="true" DataTextField="AccountDescription" DataValueField="AccountCodeID" AutoPostBack="true" OnSelectedIndexChanged="ddlAccountCode_SelectedIndexChanged">
</telerik:RadComboBox>
<telerik:RadButton id="btnSearch" runat="server" text="Search" OnClick="btnSearch_Click">
</telerik:RadButton>
</EditItemTemplate>
</telerik:GridTemplateColumn>
我正在单击按钮在RadComboBox 中进行搜索/过滤。一切正常,除非我在 RadComboBox 的文本框中键入/搜索任何内容并单击按钮进行搜索,但 RadCombo 的下拉菜单没有打开。因此,每次我都必须手动打开下拉菜单才能在 RadComboBox 中查看搜索文本的结果。
【问题讨论】:
-
我被困在其中 3 天了。我迫切需要有关相同的解决方案。请回复我发布的问题。
-
欢迎start a bounty关注您的问题。
标签: asp.net telerik radcombobox