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 have webcombo on page which is having multi selection mode.
I need to get and set value from javascript.
(whatever value is checked or unchecked i need to get and set the same)
Please look the attachment.
To get the text and value of multiple selection WebCombo using GetMultipleValuesText and GetMultipleValuesValue methods. Following snippet code shows how:
function GetValues(){ var WebCombo1 = ISGetObject("WebCombo1"); var selectedValues = WebCombo1.GetMultipleValuesValue(); var selectedText = WebCombo1.GetMultipleValuesText(); alert(selectedValues); alert(selectedText); return true; }
To set the text and value of multiple selection WebCombo using SetMultipleValues(text, value) methods. The method has two parameters, they are: text, value. The text part is list of text (DataTextField) separated by SeparatorChar. The value part is list of value (DataValueField) separated by SeparatorChar.
For example: suppose I have a multiple selection WebCombo showing list of Employees with SeparatorChar is set to ";".
<ISWebCombo:WebCombo ID="WebCombo1" runat="server" UseDefaultStyle="True" DataTextField="FirstName" DataValueField="EmployeeID" Width="477px" Height="20px"> <Columns> ... </Columns> <MultipleSelectionSettings Enabled="True" SeparatorChar=";" /> <LayoutSettings ComboMode="MultipleColumns" TextBoxMode="ReadOnly" ...> </LayoutSettings> </ISWebCombo:WebCombo>
The text part is the list of FirstName of Employees, for example: "Nancy;Andrew;Janet". And the value part is the list of EmployeeID of Employees, for example: "1;2;3". Following snippet code shows how:
function SetValues() { var WebCombo1 = ISGetObject("WebCombo1"); WebCombo1.SetMultipleValues("Nancy;Andrew;Janet", "1;2;3"); WebCombo1.RefreshTextByValueItems(); return true; }
Hope this helps.
Hi Yudi,
Thanks for the immediate reply.
your code snippet helped me a lot.
I need to find event of webcombo when the value is changed in Jquery(Javascript).
Could you please help me?
Regards
Sachin Jain
... your code snippet helped me a lot. ...
Glad to know that the snippet code of GetMultipleValuesText(), GetMultipleValuesValue(), and SetMultipleValues(text, value) helps.
For more detail information about those methods, you can find them in WebCombo documentation. 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.
You can try to use OnAfterItemSelected client-side event of WebCombo. This event fired after an item is selected.
This sample, Client_AdditionalFilters.aspx, shows how to add an additional filter (to filter the webcombo's result) from client-side by utilizing OnAfterItemSelected client-side event.
I am willing to advise you further on this question but in order to do so I would need you to create a new thread/ticket (since this event of WebCombo topic is different from the topic discussed within this thread, to get and set value in multiple selection webcombo from javascipt). I'm sure that the new thread will helps other member which might have similar question.
Thank you very much for your understanding and cooperation. Hope this helps.
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