EasyUI Forum
March 29, 2024, 02:28:11 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Combotreegrid custom textField not working  (Read 4405 times)
iLLuSia
Newbie
*
Posts: 12


View Profile Email
« on: January 07, 2017, 09:47:35 AM »

I had a combogrid, which looked like this:
Code:
$('#cg').combogrid({
            idField:'id',
            textField:'custom_desc',
            columns:[[
              {field:'desc1', title:'Description1', width:50},
              {field:'desc2',title:'Description2',width:200}
            ]]
        });
Where as the user selected a value, the "custom_desc", which is composed from multiple columns, appeared in the combo field.

Now I've updated to combotreegrid and this is no longer working. The parameter "treeField" replaces "textField" and only this one column is displayed in the box, when a value is selected, textField is ignored. I've tried to work around with "onSelect" method, but it doesn't work either. onHidePanel is working fine, if the panel is closed without selecting anything. On the other hand though, when selecting, onSelect is fired twice with onHidePanel once inbetween, and "setText" is ignored everywhere. To be precise: it's not completely ignored, it's stored as the combotreegrids text, but it's not displayed in the combo. Instead the "treeField" is displayed.

Is this a bug or am I doing something wrong? Here's the code:

Code:
$('#cg').combotreegrid({
            idField:'id',
            treeField:'desc1',
            textField:'custom_desc',
            columns:[[
              {field:'desc1', title:'Description1', width:50},
              {field:'desc2',title:'Description2',width:200}
            ]],
            onSelect: function(row) {
            console.log("onSelect");
            $('#cg').combotreegrid('setText', 'something got selected...');
            },
            onHidePanel: function() {
            console.log("onHidePanel");
            $('#cg').combotreegrid('setText', "PANEL HIDDEN  AJAJAJAJAJ");
            }
        });
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 08, 2017, 03:40:19 AM »

The 'textField' property does not exist in combotreegrid component. To use this feature, please try to download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.5.1-patch.zip.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!