iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I have two bound combos: Parent and Child. I am adding an additional row "Any for technique" to Child and display it at the top of the list using onShowDropDown event. When the user opens a DropDown, "Any for technique" row is selected and then Child is populated with the real rows. Then I select a real row "Instrument Group 1" and DropDown closes. When I open DropDown again, both rows are selected: "Any for technique" and "Instrument Group 1". If I don’t explicitly select a real row and close drop down list, “Any for technique" is selected.
I don't want "Any for technique" to be selected/highlighted. How to unselect/unhighlight it programmatically?
Thanks, Ellen
I’m willing to advise you further but in order to do so we would need you to elaborate on your specific scenario and possibly give us a running simple sample and a step-by-step guide that we can use to observe the problematic behavior.
To check the code that is used to implement “the row adding” process, put it at the top of the list (in OnShowDropDown event) will help to determine which part that may have caused the issue.
Hi Yudi,
The Parent combo is called wcboTechnique and the Child combo is wcboInstrumentGroup. I add a row to wcboInstrumentGroup onShowDropDown event. Combo boxes are populated dynamically in the table. They have “id” what is their numeric number in the table: for example wcboTechnique1, wcboInstrumentGroup1; wcboTechnique2, wcboInstrumentGroup2, etc.
I also have to use onLostFocus event to explicitly specify the selected row. Otherwise, “Any for technique” will be selected.
"InsertAtTop" doesn't do anything, since "Any for technique" is populated immediately and at the top anyway while the rest of the combo is populated a couple seconds later.
function onInstrumentGroupShowDropDown(id) {
var combo2 = ISGetObject("wcboInstrumentGroup" + id);
var newRow;
rows = combo2.GetRows();
if (rows[0]) {
cells = rows[0].GetCells();
if (cells.GetNamedItem("Description")) {
if (cells.GetNamedItem("Description").Text != "Any for technique") {
newRow = combo2.NewRow("-1");
cells = newRow.GetCells();
cells.GetNamedItem("Description").Text = "Any for technique";
rows.Add(newRow);
combo2.InsertAtTop = true;
combo2.UpdateUI();
}
} else {
function onInstrumentGroupLostFocus(id) {
// Since "Any for technique" is added on ShowDropDown event, it is highlighted automatically even if
// another InstrumentGroup is selected. hdnInstrGroupDesc is set based on intentionally selected InstrumentGroup
// and helps to retain the correct value.
var selectedText = combo2.Text;
if (combo2.Text == "Any for technique" && combo2.Value == "") {
eval("document.all.hdnInstrGroupDesc" + id).value = combo2.Text;
var InstrGroupDesc = eval("document.all.hdnInstrGroupDesc" + id).value;
combo2.SetText(InstrGroupDesc);
The issue happen because the OnShowDropDown client-side event is fired two times.
I have forwarded this to WebCombo development to be investigated further.
I’ll keep you informed with any news I heard from the team regarding this behavior.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname