EasyUI Forum
May 03, 2024, 03:49:22 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Need second set of eyes on DataGrid Reload...  (Read 12010 times)
2plus2
Jr. Member
**
Posts: 75


View Profile
« on: April 17, 2013, 07:54:54 PM »

We have a combobox as a "filter" for the datagrid, and the load/reload is not picking up the new query parameters we are trying to pass over to filter the grid:

        $('#dgFilter1').combobox({
            panelHeight: 'auto',
            selectOnNavigation: false,
            valueField: 'value',
            textField: 'label',
            data: [{ label: 'Active (All)', value: '*', selected: true }, { label: 'Active (Yes)', value: '1' }, { label: 'Active (No)', value: '0'}],
            filter: function (q, row) {
                return row.label.toLowerCase().indexOf(q.toLowerCase()) == 0;
            },
            onSelect: function (combo) {
               // Data Grid load/reload code goes here
            }
        });

We've tried the following and no matter what we do it uses the original url provided when the data grid was built via HTML:

               $('#dg').datagrid('load', {
                    a:'getFullList',
                    f:combo.value
                });
or
               $('#dg').datagrid('load', {
                    url: '/admin/ajaxCurrencies.aspx?a=getFullListf=' + f:combo.value
                });
or
               $('#dg').datagrid('load', {
                    queryParams: {
                         a:'getFullList',
                         f:combo.value
                    }
                });

What am I doing wrong?

Logged
2plus2
Jr. Member
**
Posts: 75


View Profile
« Reply #1 on: April 17, 2013, 10:02:32 PM »

Ok...This is what I got working:

            onSelect: function (combo) {
                $('#dg').edatagrid({
                    url: '/admin/ajaxCurrencies.aspx?a=getFullList&f=' + combo.value
                });
                $('#dg').edatagrid('load');
            }

If someone can explain, why my other options didn't work, I would appreciate it.
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!