0
我有一個radcombobox控件象下面這樣: -排序,其中包含列radcombobox控件中的項目:
<telerik:RadComboBox ID="RadComboBox" runat="server" EmptyMessage="Select" DataSourceID="SqlDataSource1" DataTextField="name" DataValueField="id" ShowMoreResultsBox="true" EnableVirtualScrolling="true" HighlightTemplatedItems="true" ItemsPerRequest="10" >
<HeaderTemplate>
<table style="width: 500px">
<tr>
<td style="font-weight: bold; width: 400px">Name</td>
<td style="font-weight: bold; width: 100px">ID</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table style="width: 500px">
<tr>
<td style="width: 400px"><%#DataBinder.Eval(Container.DataItem, "name")%></td>
<td style="width: 100px"><%#DataBinder.Eval(Container.DataItem, "id")%></td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>
<asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:SqlConnectionString %>" ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM table1 order by name asc" />
現在它填補我RadComboBox
。
現在我想按字母順序對我的RadComboBox中的項目進行排序,當我點擊<HeaderTemplate> "Name"
,當我點擊<HeaderTemplate> "ID"
時,我想對它進行數字排序。
現在如何做到這一點,任何人都可以給我任何建議或幫助,ThankYou!
非常感謝,我會盡量保持更新。 –
我試過你的建議,但沒有成功,新問題也開始出現。由於這不是內置的功能,我認爲這是不可能的! –
@JackCarothers很抱歉聽到這些,這不是不可能的。只要不斷努力,並積極思考!祝你好運。 – Seano666