EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: hatux7 on March 03, 2017, 12:04:04 PM



Title: Datagrid scrollview behavior
Post by: hatux7 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/ (https://jsfiddle.net/hatux7/t920usoe/)