EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 21, 2024, 05:51:57 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
Bug Report
>
Combobox method getValue() does not return value
Pages: [
1
]
« previous
next »
Print
Author
Topic: Combobox method getValue() does not return value (Read 29391 times)
arma
Full Member
Posts: 110
Combobox method getValue() does not return value
«
on:
May 05, 2014, 07:23:16 PM »
I populate combobox using method reload() as it requires some dynamic parameter
$('#cc').combobox('reload','some/path/url?¶m=xxx');
$('#cc').combobox('getData'); <-- ok, return 2 objects with id and text
I then select a combobox item.
$('#cc').combobox('getText'); <-- ok, return selected text
$('#cc').combobox('getValue); <-- not ok, return empty string
What went wrong? Thanks.
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Combobox method getValue() does not return value
«
Reply #1 on:
May 05, 2014, 07:54:05 PM »
The default value field name of combobox is 'value' not 'id'. So you have to specify the value field name as 'id'.
Code:
$('#cc').combobox({
valueField: 'id',
textField: 'text'
});
Logged
arma
Full Member
Posts: 110
Re: Combobox method getValue() does not return value
«
Reply #2 on:
May 05, 2014, 07:57:22 PM »
Ah yes, i forgot that
thank you stworthy!
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...