Hello,
I am posting my bug with steps use with uploaded Files
Step 1. Click Add Item
(there Will be 3 Items ITEM1, ITEM2, ITEM3)
Step 2. Focus Combobox and Type "item0" (Lower Case)
Step 3. Press Tab
Step 4. Focus Combobox and Type "ITEM0" (Upper Case)
Step 3. Press Tab
Please Reply Resolution if you can replicate Case.
I have Uploaded Files and ScreenShots
I am posting my bug with steps use with uploaded Files
Step 1. Click Add Item
(there Will be 3 Items ITEM1, ITEM2, ITEM3)
Step 2. Focus Combobox and Type "item0" (Lower Case)
Step 3. Press Tab
Step 4. Focus Combobox and Type "ITEM0" (Upper Case)
Step 3. Press Tab
Please Reply Resolution if you can replicate Case.
I have Uploaded Files and ScreenShots
6 Answers, 1 is accepted
0
Vishmay
Top achievements
Rank 1
answered on 02 Aug 2014, 06:30 AM
Cannot Attach ASPX so Writting code on Page
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
>Untitled Page</
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function addItem() {
var ddlTest = $find("<%=RadComboBox1.ClientID%>");
ddlTest.trackChanges();
ddlTest.clearItems();
ddlTest.clearSelection();
for (var j = 0; j <
3
; j++) {
var
comboItem
=
new
Telerik.Web.UI.RadComboBoxItem();
comboItem.set_text("ITEM" + j);
comboItem.set_value(j);
ddlTest.get_items().add(comboItem);
}
ddlTest.commitChanges();
}
</script>
</
telerik:RadCodeBlock
>
<
div
>
<
telerik:RadComboBox
ID
=
"RadComboBox1"
runat
=
"server"
Filter
=
"Contains"
OnClientKeyPressing
=
"(function(sender, e){if (e.get_domEvent().keyCode != 9) { if (!sender.get_dropDownVisible()) sender.showDropDown(); }})"
>
</
telerik:RadComboBox
>
<
telerik:RadButton
ID
=
"rbtnAddItems"
runat
=
"server"
Text
=
"Add Items"
AutoPostBack
=
"false"
OnClientClicked
=
"addItem"
>
</
telerik:RadButton
>
</
div
>
</
form
>
</
body
>
</
html
>
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class Test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
0
Shinu
Top achievements
Rank 2
answered on 04 Aug 2014, 05:55 AM
Hi Vishmay,
As a work around please do the following modification in your OnClientKeyPressing event.
JavaScript:
Thanks,
Shinu.
As a work around please do the following modification in your OnClientKeyPressing event.
JavaScript:
function
OnClientKeyPressing(sender, e) {
if
(e.get_domEvent().keyCode != 9) {
if
(!sender.get_dropDownVisible())
sender.showDropDown();
}
else
{
sender.findItemByText(sender._text.toUpperCase()).select();
}
}
Thanks,
Shinu.
0
Vishmay
Top achievements
Rank 1
answered on 06 Aug 2014, 04:51 AM
Your answer is correct for my given case.
But not possible to implement.
Point 1:
That items may come from database.
So instead of ITEM0,1,2
What if Itemlist is
Item0
ITEM1
IteM2
Point 2:
Onclicking Tab from dropdown it is not selecting value if case is different
but it is not also closing combobox
Very Tricky line i have written so i will explain with steps and screens
1. Have 3 Items : ITEM1,2,3 and typing item1 works
2. Changed item name ItEm1,2,3 and typing item1 not working(as it was expected). But
3. On Pressing Tab the combobox suggesion list remains open.
Note: Check Focus on attached file "2. Mix case not working solution After Tab.JPG"
In previous example i have posted was closing the combobox
the problem will be found when you will type "people" in item list ItEm1,2,3---> Not Found Press tab
and combobox remains open without any reason. and combobox text is also not clearing
Thank You
But not possible to implement.
Point 1:
That items may come from database.
So instead of ITEM0,1,2
What if Itemlist is
Item0
ITEM1
IteM2
Point 2:
Onclicking Tab from dropdown it is not selecting value if case is different
but it is not also closing combobox
Very Tricky line i have written so i will explain with steps and screens
1. Have 3 Items : ITEM1,2,3 and typing item1 works
2. Changed item name ItEm1,2,3 and typing item1 not working(as it was expected). But
3. On Pressing Tab the combobox suggesion list remains open.
Note: Check Focus on attached file "2. Mix case not working solution After Tab.JPG"
In previous example i have posted was closing the combobox
the problem will be found when you will type "people" in item list ItEm1,2,3---> Not Found Press tab
and combobox remains open without any reason. and combobox text is also not clearing
Thank You
0
Vishmay
Top achievements
Rank 1
answered on 06 Aug 2014, 04:54 AM
I am posing double combobox page is you need
aspx.cs file remains same
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
>Untitled Page</
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
>
</
telerik:RadScriptManager
>
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function addItem() {
var ddlTest = $find("<%=RadComboBox1.ClientID%>");
var ddlTest2 = $find("<%=RadComboBox2.ClientID%>");
ddlTest.trackChanges();
ddlTest.clearItems();
ddlTest.clearSelection();
for (var j = 0; j <
3
; j++) {
var
comboItem
=
new
Telerik.Web.UI.RadComboBoxItem();
comboItem.set_text("ItEm" + j);
comboItem.set_value(j);
ddlTest.get_items().add(comboItem);
}
ddlTest2.commitChanges();
ddlTest2.trackChanges();
ddlTest2.clearItems();
ddlTest2.clearSelection();
for (var
j
=
0
; j < 3; j++) {
var
comboItem
=
new
Telerik.Web.UI.RadComboBoxItem();
comboItem.set_text("ItEm" + j);
comboItem.set_value(j);
ddlTest2.get_items().add(comboItem);
}
ddlTest2.commitChanges();
}
</script>
</
telerik:RadCodeBlock
>
<
div
>
<
telerik:RadComboBox
ID
=
"RadComboBox1"
runat
=
"server"
Filter
=
"Contains"
OnClientKeyPressing
=
"(function(sender, e){if (e.get_domEvent().keyCode != 9) { if (!sender.get_dropDownVisible()) sender.showDropDown(); }else {sender.findItemByText(sender._text.toUpperCase()).select();}})"
>
</
telerik:RadComboBox
>
<
telerik:RadComboBox
ID
=
"RadComboBox2"
runat
=
"server"
Filter
=
"Contains"
OnClientKeyPressing
=
"(function(sender, e){if (e.get_domEvent().keyCode != 9) { if (!sender.get_dropDownVisible()) sender.showDropDown(); }else {sender.findItemByText(sender._text.toUpperCase()).select();}})"
>
</
telerik:RadComboBox
>
<
telerik:RadButton
ID
=
"rbtnAddItems"
runat
=
"server"
Text
=
"Add Items"
AutoPostBack
=
"false"
OnClientClicked
=
"addItem"
>
</
telerik:RadButton
>
</
div
>
</
form
>
</
body
>
</
html
>
0
Vishmay
Top achievements
Rank 1
answered on 08 Sep 2014, 06:19 AM
I am still looking for solution... any one there.........
0
Accepted
Hello Vishmay,
I would suggest you a slightly different approach. You could set the MarkFirstMatch property of the RadComboBox to true. Thus, at the OnClientTabSelecting client-side event of the control, you could use the get_highlightedItem() function and set the returned item as selected. I have prepared a sample example for you, which you may find attached.
Regards,
Nencho
Telerik
I would suggest you a slightly different approach. You could set the MarkFirstMatch property of the RadComboBox to true. Thus, at the OnClientTabSelecting client-side event of the control, you could use the get_highlightedItem() function and set the returned item as selected. I have prepared a sample example for you, which you may find attached.
Regards,
Nencho
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.