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 3 webcombos and the webcombo2 is linked to webcombo1.
The problem is when i try to set value to webcombo2,it always alert 'please chose Webcombo1' even i already set the value of webcombo1.When i check the issues before, i found it's because when i try to set the value of webcombo2,its data is not populated yet,and solution of the issue is give a timeout delay to set value.
Is there anyway i can set value without using settimeout ? because the load speed is different in different scene,
i could not just set a long enough timeout.
Hi Jarvan,
I think this problem occurs not because the WebCombo2’s data is not populated. Personally, I still believe it’s because failed to set the value in WebCombo1. Therefore could you let me how do you bind the data and set the value in WebCombo1? By the way I don’t quite understand about the timeout that you said. As far as I know, we don’t use settimeout for LinkWebCombo feature. Perhaps you can let me know for the details.
Regards,
Bernard
Hi Bernard,
Thank for your reply first.The timeout i said comes from this issue.
In my case,i can confirm the value of WebCombo1 has been set.Here is my temporary solution:
ISGetObject("data_node").SetSelectedRowByValue(ctrl.datasource.db); if (ctrl.datasource.src != "") { ISGetObject("data_table").LoadValue(); ISGetObject("data_table").ShowDropDown(); setTimeout(function () { ISGetObject("data_table").SetSelectedRowByValue(ctrl.datasource.src); if (ctrl.datasource.col != "") { ISGetObject("data_col").LoadValue(); ISGetObject("data_col").ShowDropDown(); setTimeout(function () { ISGetObject("data_col").SetSelectedRowByValue(ctrl.datasource.col); }, 650);//temporary solution } }, 650); }
In this case,"data_node" just as "webcombo1" i said before,"data_table" as "webcombo2" and "data_col" as "webcombo3"."data_node"Combo uses unbound mode,"data_table" linked to "data_node" and "data_col" linked to "data_table".I can confirm the value of webcombo1 has been success set because it's unbound mode.
As you see,i use 2 timeout to delay to set value of "data_table" and "data_col",now it works well but i have to wait for 1.3s ,in fact,if the delay has been set less than 600 which is 0.6s,the error will show to ask me to select "data_table" first.
Please tell me if i did something wrong.
I’ve made my own sample for this case. In my sample, I use Northwind as my database and my dataset, and I offer 2 methods for you. If you want to do it without timeout, I suggest you to choose server side method because it’s guarantee the existence of data from database. And the other method is using SetAdditionalFilters() in WebCombo client side function, but I haven’t check it on a large data. I also attached the sample for you. Hope it helps.
I've seen your sample,i'm afraid it will not work in my case.I have tried the event 'OnAfterItemSelected',i still can't set a default value to a bound webcombo without settimeout.
I will describe my problem simply,now i have to set value to a bound webcombo in clientside,and i can't use 'SetText' method because i only had the value i need to be set and i don't know the text.
So i just want to know,is there any way to confirm one webcombo is already loaded to be set value in clientside or some clientside events which can be triggered after one webcombo is already loaded and in the event i can success set a default value to the combo.
I think it can’t be done without settimeout because server need time to return the result to the client. Unfortunately for now, there’s no script or event which check if the WebCombo is already loaded and ready to set value from the client-side. That’s why the client need timeout to set the value.
There’s no way to resolved this without settimeout except by using server-side method. Moreover if you used server-side method, you can set the value without knowing the text which will appear in WebCombo.
I hope this helps you.
Ok Bernard,i will use settimeout to resolve this problem.I thought the property 'IsInProgress' will be useful but it always same value.
It suddenly occurred to me shortly before i doing something with webGrid and it has the same problem that i did not know when to set value to webGrid in Client-Side,and i resolved the problem by using settimeout too.
Is the any possible to add some property or event to check WebControls are already loaded and ready to set value in the later version or some patch?I just feel it very strange that this product can't finish such a simple request accurately.
I have added this on feature request. I will let you know any news I hear from the team regarding this feature request.
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