EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 21, 2024, 08:30:26 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
>
EasyUI for jQuery
>
Use customized id or text field name for ComboTree
Pages: [
1
]
« previous
next »
Print
Author
Topic: Use customized id or text field name for ComboTree (Read 9720 times)
nesson
Newbie
Posts: 1
Use customized id or text field name for ComboTree
«
on:
April 30, 2014, 12:17:07 AM »
Hello there,
While we were testing on combotree, we found there isn't a function or property to customize 'id' or 'text', like combobox there are properties 'valueField' and 'textField' to indicates using which json obj to render text field or value field, so here we have to make the returned json data exactly matches {id :xx, text: xx} format, but our returning data is something like {u_id: xx, u_name: xx}. is there any suggested way to solve this problem rather than do a data conversion?
Thank you
Nesson
«
Last Edit: April 30, 2014, 12:20:09 AM by nesson
»
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Use customized id or text field name for ComboTree
«
Reply #1 on:
April 30, 2014, 01:43:41 AM »
The 'loadFilter' function can be used to convert your data to the standard tree data.
Code:
$('#cc').combotree({
loadFilter: function(data){
// return the filtered data
}
});
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...