EasyUI Forum
October 11, 2025, 11:28:38 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: Change backgroundColor of combotree in datagrid filter on: July 03, 2017, 10:07:10 AM
stworthy thank you for all your help, now my page works very nice  Smiley
2  General Category / EasyUI for jQuery / Re: Change backgroundColor of combotree in datagrid filter on: June 29, 2017, 10:51:44 AM
This code has no problem.
Code:
$('#cc').combotree('textbox').css({backgroundColor: '#BAD7C9', color: '#515D57'});

You are right, if you create the combotree with an id like this:

Code:
$('#cc').combotree({
    url: 'get_data.php',
    required: true
});

that code works, the problem is my combotree has no id, because is create inside the datagrid filter:

Code:
$('#dg').datagrid('enableFilter',[
{
  field:'users',
  type:'combotree',
  options:{
    url:'get_users.php',
    multiple:true,
    checkbox:true,
    onCheck:function(node,checked){
        $('#dg').datagrid('addFilterRule', {
           field: 'users',
           op: 'equal',
           value: node.text
        }).datagrid('doFilter');

        //Change the background color here
    }
  }
}
]);


I tried to change with:
Code:
$(this).parent().combotree('textbox').css({backgroundColor: '#BAD7C9', color: '#515D57'});

But in console throws error: Uncaught TypeError: Cannot read property 'textbox' of undefined


So the only way i can do this is with:
Code:
$('#dg').datagrid('getFilterComponent','users').combotree('textbox').css({backgroundColor: '#BAD7C9', color: '#515D57'});

But i don't know if is the best way.
3  General Category / EasyUI for jQuery / Change backgroundColor of combotree in datagrid filter on: June 28, 2017, 08:06:22 AM
Hello

I search to achieve this but nothing seems to work, i have a datagrid with a filter and one of the fields is type 'combotree', i want to every time the user check an option in the combotree the combotree change the background to green.

I can do this with: textbox, numberbox, combobox, and datebox with this code:

Code:
$('#myTextbox').textbox('textbox').css({backgroundColor: '#BAD7C9', color: '#515D57'});

but i dont know how to do the same in combotree, if i use this code throws error.

Can you help me please!
4  General Category / EasyUI for jQuery / Re: help with filtering please on: March 09, 2017, 08:27:23 AM
Hi, i can't see your updates, but i made some changes into the fiddle:

https://jsfiddle.net/hatux7/korr1gxo/2/

I understand you want the button of options 'equal' and 'notequal'  at the right of the combobox to:

1) Select option from the combobox
2) Click the filter button an select 'nofilter', 'equal' or 'notequal'

Is that what you want?
5  General Category / EasyUI for jQuery / Re: help with filtering please on: March 07, 2017, 03:07:01 PM
In the op possible values are: contains,equal,notequal,beginwith,endwith,less,lessorequal,greater,greaterorequal.

So doesn't recognize: 'notequals'.

Take a look: https://jsfiddle.net/hatux7/korr1gxo/
6  General Category / EasyUI for jQuery / Re: linkbutton toggle on: March 03, 2017, 03:17:29 PM
The 'uncheck' method doesn't exist for the linkbutton, use:

Code:
$('#sb').linkbutton('unselect');

7  General Category / EasyUI for jQuery / Datagrid scrollview behavior on: March 03, 2017, 12:04:04 PM
Hello

I start to use this fabolous framework in my web pages, but now im stuck with some scenario.

I have a datagrid and i add the extensions: 'datagrid-filter' and 'datagrid-scrollview', my data is about 650 rows at this moment and growing.

Correct me if im wrong, but i understand when you reload the datagrid the event 'onLoadSuccess' fires, so whit this in mind i want to execute some code every time the datagrid is reloaded (everytime onLoadSuccess event fires).

I create a button in the datagrid toolbar to clear the filter when the user click it:
Code:
$('#btnRemoveFilter').linkbutton({
    iconCls: 'icon-clear',
    plain: true,
    onClick: function() {
      dg.datagrid('removeFilterRule').datagrid('doFilter');
    }
  });

When i use pagination , every time the user click the clear button the onLoadSuccess event fires, this i check with a simple:
Code:
console.log('onLoadSuccess);
So here i want to add my next coding...

The problem is if i want to use scrollview adding to the datagrid:
Code:
view: scrollview

When the user click the clear button the event 'onLoadSuccess' never fire again, i dont know why and how to achieve this, thank you all off you for any help.

I create a fiddle to clarify my code: https://jsfiddle.net/hatux7/t920usoe/
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!