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 three combo boxes: cbo1 is a Parent of cbo2 and cbo2 is a Parent of cbo3. All combos are populated dynamically.
Everything works fine with cbo1: I can set the Default value on Load. The problem is with cbo2 and cbo3. After I select a value in cbo1, I use a function to set Default Value for cbo2:
cbo1.LayoutSettings.ClientSideEvents.OnAfterItemSelected = "onCbo1SelChange"
I tried to use two methods listed below in onCbo1SelChange to set the Default value, but both methods don't work:
cbo2.SetSelectedRowByValue(Value);
cbo2.SetSelectedIndex(id);
If I use cbo2.SetText(sText), the Default value is set correctly in cbo2, but cbo3 is empty. Cbo3 should get populated when a value is selected in cbo2. When I manually open cbo2 and select a value, then cbo3 is populated.
The problem exists only when I use a Bound method to populate the combos. If I use an Unbound method, everything works fine, but I cannot use Unbound method in this case. Please help.
Please try to add following code in the OnAfterItemSelected client-side event of the parent WebCombo, for example cbo1 (the parent WebCombo of cbo2).
function onCbo1SelChange(controlId) { var cbo1 = ISGetObject(controlId); var cbo2 = ISGetObject("cbo2"); cbo2.SetText("Nancy"); cbo2.LoadValue(); return true; }
WebCombo provides a client-side method to set selected row in bound WebCombo, as shown in the snippet code above. The first step is to configure the WebCombo text by executing SetText(string) method. After set the text of WebCombo, please remember to invoke LoadValue() method, in order to instruct WebCombo to fetch the value of the correspond inserted text from the server. the LoadValue() method is required for bound mode WebCombo, because when a new text is set, the WebCombo doesn’t have the related value in client-side since the data has not been loaded. This method is not required for unbound mode.
Hope this helps.
Yudi,
"cbo2.LoadValue();" is what I didn't know about. It fixed the problem.
Thank you!
Glad to hear that the LoadValue() method helps.
Should you need further assistance or run into any problems regarding our controls, feel free to post it into our forum. We would be happy to assist you again.
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