I have a RadComboBox that I need to sort by a column other than the Text or Value fields.
The Datasource and the control html is below.
An example subset of the values are:
ID Rank Sequence
8 E8 8
9 E9 9
10 O1 10
19 O10 19
11 O2 11
The column 'Sequence' is there to get it to sort in the right order because sorting on the key/ID and the Rank might not get it in the order the user is expecting it. In the case above, "O2" should follow "O1" and "O10" should follow "O9".
The example at: http://www.telerik.com/help/aspnet-ajax/combobox-how-to-implement-custom-sorting.html didn't seem to be what I needed.
DefaultContainerName="PatientEntities" EnableFlattening="False"
EntitySetName="Lookup_Rank"
AutoPage="true" OrderBy="it.[Sequence]">
</asp:EntityDataSource>
<telerik:RadComboBox ID="ddlRank" runat="server" Height="150px" Width="128px" AutoPostBack="true" OnDataBound="ddlRank_DataBound"
AllowReorder="false" DataSourceID="edsLookup_GetRanks" Sort="None"
DataTextField="Rank" DataValueField="Rank" ></telerik:RadComboBox>
</td>
**Note: The forum editor was broken and wouldn't let me format as code.
The Datasource and the control html is below.
An example subset of the values are:
ID Rank Sequence
8 E8 8
9 E9 9
10 O1 10
19 O10 19
11 O2 11
The column 'Sequence' is there to get it to sort in the right order because sorting on the key/ID and the Rank might not get it in the order the user is expecting it. In the case above, "O2" should follow "O1" and "O10" should follow "O9".
The example at: http://www.telerik.com/help/aspnet-ajax/combobox-how-to-implement-custom-sorting.html didn't seem to be what I needed.
DefaultContainerName="PatientEntities" EnableFlattening="False"
EntitySetName="Lookup_Rank"
AutoPage="true" OrderBy="it.[Sequence]">
</asp:EntityDataSource>
<telerik:RadComboBox ID="ddlRank" runat="server" Height="150px" Width="128px" AutoPostBack="true" OnDataBound="ddlRank_DataBound"
AllowReorder="false" DataSourceID="edsLookup_GetRanks" Sort="None"
DataTextField="Rank" DataValueField="Rank" ></telerik:RadComboBox>
</td>
**Note: The forum editor was broken and wouldn't let me format as code.