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.
At the first time requesting data, RadClientDataSource sends multiple requests to the server. All subsequent requests for Paging, Sorting work as expected.
We are running HTML validators as part of an effort to attain WCAG 2.0 A compliance. Among the errors we are seeing is The summary attribute is obsolete. Consider describing the structure of the table in a caption element or in a figure element containing the table; or, simplify the structure of the table so that no description is needed. Here is a snippet of the failing HTML, apparently from the rendering of the RadSocialShare control: <div id="ctl00_TemplateBody_WebPartManager1_gwpciNewSocialShareCommon_ciNewSocialShareCommon_RadSocialShare1_compactPopup_C_comboBox" class="RadComboBox RadComboBox_Default" style="width:160px;"> <table summary="combobox" border="0" style="border-width:0;border-collapse:collapse;"> We are currently running version 2013.2.717.45 of the ASP .NET for AJAX controls, but we just tried 2013.3.1015.45 and it didn't fix things in this regard, either. There is a similar discussion at http://www.telerik.com/community/forums/aspnet-ajax/combobox/table-summary-attribute.aspx , which recommends a jQuery fix. This fix works in terms of removing the summary attribute from that table, but it does not result in clean HTML when the w3c validator is run against it, so we believe that is not an acceptable workaround. In the discussion at http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/accessibility-issues-various.aspx , some mention is made of fixing the combo box for the 2012 Q3 release, but it doesn't look like that happened.
Why don't you include a boolean property to show selected image inside input ? This is already a code library to do it : http://www.telerik.com/support/code-library/show-the-selected-item-image-in-input
In a FormView, a routine scenario is to provide a control that has some sort of picklist (either DropDown or ComboBoxList) that may be tied to a field that contains a DBNull. An example might be where one of the fields in the Telerik Profile specifies their favorite Telerik Product (KendoUI, ASP.NET AJAX, etc.). However, their might be profiles where the user has not selected a favorite product. Assuming that the Product list comes from a related table, then this field (say, FavoriteProductId) in the Profile would contain a DBNull. I would like Telerik to add "declarative" functionality on the RadComboBox and RadDropDownList to handle the case where SelectedValue = DBNull. Below is an example of what this might look like for a RadComboBox (inside of a FormView -- note: only showing the RadComboBox declaration). <telerik:RadComboBox Style="z-index: 9100" ID="rcbFirstOrder" runat="server" Width="50px" SelectedValue='<%# Bind("FirstOrder") %>' HandleDBNull="true" > <Items> <telerik:RadComboBoxItem runat="server" Text="" Value="DbNull (or Null or Nothing)" /> <telerik:RadComboBoxItem runat="server" Text="No" Value="0" /> <telerik:RadComboBoxItem runat="server" Text="Yes" Value="255" /> </Items> </telerik:RadComboBox> Notice the new property --- HandleDBNull = true and the ability to define the value on a RadComboBoxItem as DBNull (or null or nothing) -- some string to define DBNull. Although the above example shows all the RadComboBoxItems defined declaratively, this scenario could easily be extended to use AppendDataBoundItems = true and the non-DBNull values to come from a Data Source. Thanks for taking the time to consider this functionality. This enhancement would remove all of the code-behind tweaks that are currently incorporated to use a ComboBoxList / DropDownList with a database field that can contain DBNull.
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>
The OnClientTextChange event is triggered inconsistently in RadComboBox.
Typing custom text in the following RadComboBox and pressing enter does not fire the event:
<script lang="javascript" type="text/javascript">
function OnClientTextChange(sender, eventArgs) {
alert("You typed " + sender.get_text());
}
</script>
<telerik:RadComboBox
ID="RadComboBox1"
runat="server"
AllowCustomText="true"
OnClientTextChange="OnClientTextChange">
<Items>
<telerik:RadComboBoxItem Text="item1" Value="item1" />
<telerik:RadComboBoxItem Text="item12" Value="item12" />
<telerik:RadComboBoxItem Text="aaaa" Value="aaa" />
<telerik:RadComboBoxItem Text="bbbb" Value="bbb" />
<telerik:RadComboBoxItem Text="AAAA1" Value="AAAA1" />
<telerik:RadComboBoxItem Text="bbbb1" Value="bbb1" />
<telerik:RadComboBoxItem Text="item11" Value="item11" />
</Items>
</telerik:RadComboBox>
Example demo: https://demos.telerik.com/aspnet-ajax/combobox/examples/overview/defaultcs.aspx
And here's what JAWS sees:
Note the extra unlabeled "Button" following every combo box. This is confusing to the reader. They have no way to know that it is associated with the preceding field.
Additionally, I've noted that when aria-support is turned on, this button becomes focusable. Tabindex="0" is added to the span inside the text box. We prefer the older functionality where the button was not a tab stop. Which is the same behavior you have when aria support is turned off. For reference, see your own aria demo:
Note that the tab key stops on the drop down arrow. (You can check the previously linked demo and see that the arrows in those boxes are not tab stops.)
If right-click the arrow and inspect, you'll find the following:
<span id="ctl00_ContentPlaceholder1_RadComboBox2_Arrow" class="p-icon p-i-arrow-60-down" role="button" aria-controls="ctl00_ContentPlaceholder1_RadComboBox2_listbox" tabindex="0"></span>
Adding aria support should not change behavior, so we'd prefer the tab stop was removed.
In our own application, we have additional problems when the button is focused and activated with either the "space" or "enter" keys, it refocuses the field, but it does not actually open the drop down. I do not see that problem in your demo. However, if the arrow button was removed as a tab stop and from the INS+F5 dialog, this would not be a problem.
Please note that all of the above is in Chrome.
Using the following code in the OnClientLoad event of the ComboBox:
var _DropDown_OnClientLoad = function (sender, args) {
var input = sender.get_inputDomElement();
//Remove tabindex from down-arrow button. We never want to focus this button.
$telerik.$(input).siblings("button").find("[role=button]").attr("tabindex", null);
//hide the down-arrow button from screen readers. The entire combo box
//should be considered a single control.
$telerik.$(input).siblings("button").attr("aria-hidden", "true");
}
The input box (TextBox) portion of the Rad Combo box could benefit from the ability to customize/format the data presented within said element. Having the ability to toggle it to a multi-line TextBox would aid in this ability as well. Having the ability to implement custom html in the form of a template, perhaps a SelectionBoxTemplate, would open the control of the display to be completely customizable. Please consider this enhancement in a future release. Thanks...
FYI: this is basically an edit of a previous post. Original didn't allow edits. Please add a Server Side event for OnBlur or OnClose for the RadComboBox with the option for an auto postback. The Telerik support team suggested using the "TextChanged" event. However, this does not work for my purpose and here is why: Mainly because it appears that an event fires immediately after each check/uncheck. I have been using a dropdowncheckbox control by another vendor in multiple projects over the past 3 years (many, many instances). It fires an event when you click anywhere out side the dropdown or when you collapse the dropdown (close). This is perfect because many of these dropdowns supply parameters to SSRS reports that are generated on the webpage and I can iterate through the object and process all of the items that are checked at the same time, pass all parameters to the various reports. Users of these website have requested that after selecting (checking) which values they want to choose, they want the reports to run automatically and don't want to click a "Run reports" button. I am doing this currently with the other control. *** How could I possibly determine when the user is done checking/unchecking items using the "TextChanged" event? With an OnBlur or OnClose event it's a No-Brainer. Event --> Do Processing... Our company made a decision to standardize our tool set and picked Telerik as that toolset vendor. The lack of having an event that fires similar to the control that I have been using in the past will require unnecessary code modification. In summary, if there was a similar event I could simply rename each instance of my C# event handlers (methods) across all projects, then modify that code to iterate through the RadComboBox instead of the control I currently use and be done. Find --> Replace, mostly. For the one (1) instance of the RadComboBox that I have tried I was able to create a work-around by placing code in the IsPostback of the Page_Load event and iterate through the radcombobox, getting the checked values and then doing whatever processing needs to be done. This not work for most of the pages in my projects mentioned above due to different circumstances. Thanks!
Please add a Server Side event for OnBlur or OnClose for the RadComboBox. The Telerik support team using the "TextChanged" event. However, this does not work for my purpose and here is why: Mainly because it appears that an event fires immediately after each check/uncheck. I have been using a dropdowncheckbox control by another vendor in multiple projects over the past 3 years (many, many instances) which fires when you click anywhere out side the dropdown. This is perfect because many of these dropdowns supply parameters to SSRS reports that open on the webpage and users of these webpages have requested that after selecting (checking) which values they want, they want the reports to run automatically and don't want to click a "Run reports" button. *** How could I possibly determine when the user is done checking/unchecking items using the "TextChanged" event? With an OnBlur or OnClose event it's a No-Brainer. Event --> Do Processing... Our company made a decision to standardize our tool set and picked Telerik as that toolset vendor. The lack of having an event that fires similar to the control that I have been using in the past will require unnecessary code modification. In summary, if there was a similar event I could simply rename each instance of the C# event handlers (methods) across all projects and be done. Find --> Replace. For the one (1) instance of the RadComboBox that I have tried I was able to create a work-around by placing code in the IsPostback of Page_Load and iterate through the combobox, getting the checked values and then whatever processing needs to be done. This will not work but for very few of the pages in the projects mentioned above. Thanks!
Using the client-side requestItems method of a RadComboBox to fire the refresh of it's items(with a call to clearCache before to ensure that the refresh is performed), doesn't always perform the async callback request, sometimes resulting in the "Loading" text being added at the top of the combo's items drop-down and staying there (as the callback to the server is never fired, so it's result never received). After quite a bit of trials, I finally managed to figure out that the issue arise when there is an async postback in progress on the page (to refresh an update panel) when requestItems is called. Stepping through the requestItems call with IE F12 tools, I found that this is due to the fact that the Sys.WebForms.PageRequestManager do not perform callbacks if there is an async postback in progress. I think that the RadComboBox should detect that situation and wait until the end of the async postback to fire it's requestItems callback, otherwise the combo get stuck in the "loading in progress" state, waiting for the end of the callback that will never happens as the PageRequestManager did not start it. Additionally, in F12 Network tab, I can see that there is no request performed for the callback to request the items of the combo-box. I reproduce the issue with the following steps: 1- Have a page with a RadComboBox, a ScriptManager with partial rendering enabled and an UpdatePanel. 2- In the browser, trigger the async postback to refresh the UpdatePanel 3- From JavaScript, while the async postback is in progress, call the requestItems method of the RadComboBox 4- Open the drop-down of the combo, and you can see the "Loading" text at the top, with the initial list of items. And it stays like this until another call is made to requestItems when there is no async post-back in progress which will actually perform the callback.
This error comes up often for this control and workarounds have been discussed and posted. See below http://www.telerik.com/forums/radcombobox-error-selection-out-of-range-parameter-name-value http://www.telerik.com/forums/selection-out-of-range-excpetion http://www.telerik.com/forums/selection-out-of-range-parameter-name-error-need-to-be-able-to-set-values-that-don-t-exist-in-the-combobox http://www.telerik.com/forums/selection-out-of-range-parameter-name-value http://www.telerik.com/forums/selection-out-of-range-parameter-name-value-radcombobox-in-radgrid http://www.telerik.com/forums/radcombobox-selection-out-of-range-error The feature request is the following: 1. Add an Attribute to the RadComboBox, RadDropdownList (and any other controls that suffer from this issue). 2. Let's call the Attribute -- AppendIfSelectedValueMissing. 3. This attribute would be a boolean (True / False). Default is FALSE. 4. If AppendIfSelectedValueMissing=True then when the value of record is being Databound to a RadComboBox, RadDropDownList, etc. A check (or Try/Catch) would occur to ensure that the Value exists in the DataSourceList and if it does NOT exist in the list then the SelectedValue would be Appended to the List. Thus, eliminating the "Selection out of range, Parameter, Value" error. This occur often because some lists get changed over time; however, the historical data may have a value that is no longer on the list -- thus triggering the error. For example, let's say we ask for a user's Favorite Color. Our original list was: Red, Green, Blue but for some reason -- management, changing user requirements, etc. the new list is Red, Orange, Blue Now, if we DataBind a RadComboBox to a historical record with Green as value, we get the "Selection Out of Range" errror. What I am proposing is -- if we set the AppendIfSelectedValueMissing = True then databinding to a historical record with Green would have the following occur. List from DB --- Red, Orange, Blue SelectedValue -- Green AppendIfSelectedValueMissing New List for Ctrl -- Red, Orange, Blue, Green Thus, the error goes away, the historical data can stay the way it is and the lists can adjust their choices over time. All good for everyone!!! Thanks for your consideration.
MarkFirstMatch and Filter functionalities are not supported when checkboxes are enabled, as specified in the Checkbox Support help article. If you remove these two functionalities, the Check All checkbox works as expected. I want to have on the MarkFirstMatch and the filter on and the "all" to be shown. see ticket number 942452
Given a RadComboBox with search, if the user enters some search text and then clicks on one of the filtered entries in the dropdown list the validation event is fired as the entry box loses focus and results in a 'false' return from validation as it uses the 'Text' property which is the search string. Validation is then refired as a result of clicking on the entry. However, the initial 'false' return can cause unwanted behaviour in code that depends on the validation event. I can supply a sample project demonstrating the problem, but it needs more than the 10 MB upload limit.
the dorpdown area doesn't support html encoded data.
Hi Telerik Support,
How do I move loading box to bottom of the combo box list when using load on demand feature. the case is we're using ShowMoreResultsBox=true and EnableVirtualScrolling=true and trying to get next batch of data on a heavy query, the loading box not showing on the list see image (2020-12-03 14_31_40-Agent - Verint Express.png).
can we show the loading box on the bottom of the dropdownlist, so user is aware that the data still being loaded.
Thank you
Browser:
Microsoft Edge 44.18362.449.0
Telerik Control:
RadCombobox
Teleri Version: Version=2017.3.913.45,
Issue:
When a item is selected and a postback is occured, the SelectedValue returns an empty string.
Expected behavior:
The correct SelectedValue should be return.
Thing that have been tried so far:
1: upgrade the telerik to the latest version (2020.114) ---> issue persists
2: set autopostback to "true" problem solved
3: use other browsers (chrome, FireFox, new Version 79.0.309.68 ) issue disappears
Sample code:
1: aspx
<
telerik:radcombobox
id
=
"ddlSupplier"
runat
=
"server"
skin
=
"Material"
rendermode
=
"Lightweight"
cssclass
=
"materializeit"
enableloadondemand
=
"true"
inputcssclass
=
"browser-default"
width
=
"100%"
filter
=
"Contains"
highlighttemplateditems
=
"true"
showmoreresultsbox
=
"false"
onitemsrequested
=
"ddlSupplier_ItemsRequested"
autopostback
=
"false"
>
</
telerik:radcombobox
>
2: code behind
protected void Page_Load(object sender, EventArgs e)
{
}
protected void saveIssue_Click(object sender, EventArgs e)
{
}
protected void ddlSupplier_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
{
RadComboBoxItem li = new RadComboBoxItem("Alan Jones (Brunel Systems Pty Ltd, test site)", "123");
ddlSupplier.Items.Add(li);
li = new RadComboBoxItem("Jackie Chiu (Optimum Construction, Optimum Construction (Sydney)) ", "23" );
ddlSupplier.Items.Add(li);
li = new RadComboBoxItem("Erik Baker (Optimum Construction, Optimum Construction (Sydney))", "2323");
ddlSupplier.Items.Add(li);
}
protected void b_Click(object sender, EventArgs e)
{
var a = ddlSupplier.SelectedValue; // most of the time returns "" for Edge
}
In WebService binding scenario, the text of the items is not encoded and HTML code might get executed.
In Server-side Load on Demand binding this is not observed.
The following code can be used as a temporary workaround for WebService binding scenario:
<script type="text/javascript">
Telerik.Web.UI.RadComboBoxItem.prototype._renderItemContent = function (d) {
if (this.get_imageUrl()) {
this._renderImage(d);
}
//https://stackoverflow.com/questions/6234773/can-i-escape-html-special-chars-in-javascript
function escapeHtml(unsafe) {
return unsafe
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/"/g, """)
.replace(/'/g, "'");
}
d[d.length] = escapeHtml(this.get_text());
}
</script>