Currently, the behavior on selection is to highlight the selected item, so modifying the appearance of a selected item would affect the appearance of hovered items as well.
In the meantime, a custom CSS class can be added/removed to the selected item as in the snippet below:
<script>
function OnClientLoad(sender, args) {
var selectedItem = sender.get_selectedItem();
if (selectedItem) {
$telerik.$(selectedItem.get_element()).addClass("rcbSelected");
}
}
function OnClientSelectedIndexChanged(sender, args) {
$telerik.$(sender.get_dropDownElement()).find(".rcbSelected").removeClass("rcbSelected");
var selectedItem = sender.get_selectedItem();
if (selectedItem) {
$telerik.$(selectedItem.get_element()).addClass("rcbSelected");
}
}
</script>
<style>
div.RadComboBoxDropDown .rcbSelected {
color: red;
background-color: lightgreen;
}
</style>
<telerik:RadComboBox ID="RadComboBox1" runat="server" RenderMode="Lightweight" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged" OnClientLoad="OnClientLoad" MaxHeight="150">
<Items>
<telerik:RadComboBoxItem Text="Item 1" />
<telerik:RadComboBoxItem Text="Item 2" />
<telerik:RadComboBoxItem Text="Item 3" Selected="true" />
<telerik:RadComboBoxItem Text="Item 4" />
</Items>
</telerik:RadComboBox>
Hi,
This is a follow on request from a ticket raised where it was stated this feature isn't available and there is no work around.
When you hook a RadCombobox to a RadClientDataSource, which returns a paginated set of results along with a count of total number of records, the RadCombobox should display the "Show More Results" box along with the text stating "Items 1 - x of y" as all that information should be able to be calculated from the data returned.
Hello, Here is how i bind the dropdown. when i trype anything in dropdown it only search based on product code, but i also want search to perform on product code, Product name and wood type code. Please let me know how can i achieve same. <telerik:RadComboBoxDataSourceID="SqlDataSource1"DataTextField="ProductCode"DataValueField="idxProductPriceID"EnableAutomaticLoadOnDemand="True"ItemsPerRequest="10"ShowMoreResultsBox="true"EnableVirtualScrolling="true"AutoPostBack="true"OnSelectedIndexChanged="drpProduct_SelectedIndexChanged"EnableLoadOnDemand="true"EnableScreenBoundaryDetection="true"HighlightTemplatedItems="true"MarkFirstMatch="false"Filter="Contains"ID="drpProduct"DropDownAutoWidth="Enabled"Width="100px"runat="server"><HeaderTemplate><tablestyle="width: 100%"cellspacing="0"cellpadding="0"><tr><tdstyle="width: 20%;">Product Code </td><tdstyle="width: 40%;">Product Name </td><tdstyle="width: 40%;">Wood Type Code </td></tr></table></HeaderTemplate><ItemTemplate><tablestyle="width: 100%"cellspacing="0"cellpadding="0"><tr><tdstyle="width: 20%;"><%#DataBinder.Eval(Container.DataItem, "ProductCode")%></td><tdstyle="width: 40%;"><%#DataBinder.Eval(Container.DataItem, "ProductName")%></td><tdstyle="width: 40%;"><%#DataBinder.Eval(Container.DataItem, "WoodTypeName")%></td></tr></table></ItemTemplate></telerik:RadComboBox><asp:SqlDataSourcerunat="server"ID="SqlDataSource1"ConnectionString="<%$ ConnectionStrings:Default %>"ProviderName="System.Data.SqlClient"SelectCommandType="StoredProcedure"SelectCommand="3_ProductList_Select"></asp:SqlDataSource>
RadCombobox WAI-ARIA improvements
1. When we have a selection but do not have filtering and custom text:
aria-autocomplete: list ---> Combobox list item
2. When we have selection and filtering: ---> Combobox inline completion list item
aria-autocomplete: both
3. disabled: aria-autocomplete: none
In combo box once a value is selected there is no option to clear the selection. We can have an additional button outside the combo box to achieve the same.
This will require some additional coding.
Since this is a regular scenario why can't there be a property within the RadCombo Box that makes clear selection button visible next to the combo box drop-down button and does the task of clearing the selection?