EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Coder on March 24, 2023, 07:13:11 PM



Title: [SOLVED] .combotree textField - didnt work
Post by: Coder on March 24, 2023, 07:13:11 PM
Code:
textField	string	The underlying data field name to bind to this ComboTree. Available since version 1.5.2.

Code:
  $('#Label').combotree({
      url: '?getLabels'
    , idField: 'ID'
    , textField: 'Name'
    //, valueField: 'Name'
    //, treeField: 'Name'
  ...
 });


json and result in screenshots


Title: Re: .combotree textField - didnt work
Post by: jarry on March 26, 2023, 07:32:35 PM
Please define the 'formatter' function to display the tree node's text on the drop-down panel.
Code:
$('#Label').combotree({
      url: '?getLabels'
    , idField: 'ID'
    , textField: 'Name'
    , formatter: function(node){
      return node.name;
    }
  ...
 });