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
Hi,
I get another issue.
Scenario the same: WebCombo1 and Button.
Javascript:
this.onload = Button1_onClick; function WebCombo1_OnInitialize(ctrlId) { var WebCombo1 = ISGetObject("WebCombo1"); WebCombo1.ShowDropDown(); return true; }
function Button1_onClick() { var WebCombo1 = ISGetObject("WebCombo1"); alert(WebCombo1.IsValueInRange()); }
When the page (on the client side) trigger onload event , I've got alert with "false". When I click on Button1 once again I've got true.
More complicated scenario:In my app I'd like to read some additional information (from my webcombo with multicolumn ) at onload page (client side) and call some method to enable, disable, set default parameters another controls.
How can I do that ?
regards
Andrzej
Hi
In this thread I've described server side events (please look at my example)
protected void FormView1_ItemCreated(object sender, EventArgs e) { if (FormView1.CurrentMode == FormViewMode.Edit) { DataRowView rowView = (DataRowView)FormView1.DataItem; if (rowView != null) { //test binding WebComboCategory.Value = "2";//Condiments WebComboProduct.Value = "3";//Aniseed Syrup } } }
After Page_onLoad method , all WebCombo's on my page start connect to database (trigger method ISDataSourceList_Selecting) before FormView1_ItemCreated. But in this moment there is no any Value in WebComboCategory, so the WebComboProduct list empty, next start FormView1_ItemCreated event and I set some Value to both WebCombo's, I expect to refresh WebComboProduct, but there is no any action on ISDataSourceList_Selecting. I've tried to do that manully using WebComboProduct.ClearCachedDataSource(); , but no result:
//test binding WebComboCategory.Value = "2";//Condiments WebComboProduct.Value = "3";//Aniseed SyrupWebComboProduct.ClearCachedDataSource();// ISDataSourceList_Selecting is't trigger
My question is :
1. Why my render page has WebComboProduct empty ??
2. How ClearCachedDataSource() works ?
I've just tried and I've got alert with "value is Thomas Hardy"
Maybe it'e a question of my version: Combo: 4.0.7200.214 ; WebUI.Net Frm: 3.0.5000.702 !?
Thank you for answer, but (please analyze comments):
combo.SetText("Thomas Hardy", true); // true => text=value combo.LoadValue(
alert(combo.Value); // => alert show the same text as you set (Thomas Hardy), we expected Value='AROUT' not Text
}
Try to put on the page second button, then click Button1 and next Button2, you get Value='AROUT'
In my app. I've more complicated situation , so Linked WebCombo solution is out. Maybe I'm wrong, but I suppose that linked Webcombo don't create SQL syntax with conditions, but only filter cached data.How feel linked WebCombo with more than 1milion record in database ?
BTW, your suggestion about UpdateState() is perfect
Here is full javascript :
function WebCombo1_OnAfterItemSelected(controlId) {var WebCombo1 = ISGetObject("WebCombo1");var WebCombo2 = ISGetObject("WebCombo2");WebCombo2.ClearSelection();var wc1CatID = WebCombo1.Value;switch (wc1CatID) {case "1": WebCombo2.SetText("Chai");break;case "2":WebCombo2.SetText("Aniseed Syrup");break;default:WebCombo2.IsDirty = true;WebCombo2.NeedClearList = true;break;}WebCombo1.UpdateState();WebCombo2.LoadValue();}
I tested and IsDirty and NeedClearList must be set to true, in other way we receive unexpected result.
Thank you
It's not the same, it's more complicated
I've have to set WebCombo Value in ItemCreated.
Please analyze the event trigger:
onLoad -> _Selecting(FV) -> _Selecting (List) ->_ItemCreated
If you set Value in OnLoad, that's Ok , but If we try set set in ItemCreated it's not working.
In my opinion it's BUG. How can we manualy refresh WebCombo on the server side ?
see attachment.
I have similar problem, but I don't use SendCustomRequest(), but LoadValue() on combo2 and combo3 (it should be more efficient), Problem is on the server side I can't read Value of the combo1 (WHY!!!) - It's a BUG. We can obey this if, I write combo1.Value to some hidden fields and read this one on the server - but it's not prof.
Any idea?
of course you're right, but it's a little bug in SetValueData function.
RegardsAndrzej
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