EasyUI Forum
May 09, 2024, 02:04:29 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 ... 11 12 [13]
181  General Category / EasyUI for jQuery / combobox and onBeforeLoad on: February 14, 2014, 06:47:09 AM
Hi all,

I have a field with a combobox editor (the field is in a databgird).
I use the onBeforeLoad function in order to populate the content on the combox (the data is read from another datagrid).

Here is the code:
Code:
               {field:'Jptask',title:'Op',width:10,
                   editor: {
                      type: 'combobox',
                      options: {
                         onBeforeLoad:function() {
                            var rows = $('#dg_Jobtask').datagrid('getRows');
                            var json = [];
                            for (var i=0; i<rows.length; i++) {
                               json.push({ id: rows[i].Jptask, text: rows[i].Jptask })
                            }
                            $(this).combobox('loadData', json);
                         }
                      }
                   }
               },

All work as expected.
The only problem is that the onBeforeLoad function is executed only the first time when the user click on the combobox.
Is it possible to execute this function every time when the user click on the combobox ?

Thanks in advance for any help.
Miche
182  General Category / EasyUI for jQuery / Re: CRUD DataGrid + DataGrid Filter Row on: January 23, 2014, 12:49:15 AM
Hi stworthy,

it works perfectly !!
Thanks a lot for your help !

Miche
183  General Category / EasyUI for jQuery / CRUD DataGrid + DataGrid Filter Row on: January 22, 2014, 06:23:43 AM
Hi all,

I am new with jeasyui.

I have downloaded (and installed) "CRUD DataGrid".
All works perfectly !
Here you can try my installation:
http://195.144.40.170/jeasyui/index1.html

As a second step I have added "DataGrid Filter Row".
In order to enable "DataGrid Filter Row", as described in the documentation, I have added the following 2  lines:
<script type="text/javascript" src="datagrid-filter.js"></script>
dg.edatagrid('enableFilter');

... and modified the following line:
dg = $('#dg').edatagrid({
Here you can try "RUD DataGrid + DataGrid Filter Row"
http://195.144.40.170/jeasyui/index2.html

As you can verify the last link has problems.
If for example you add a new record and then hit the "reload" button, the new record disappears from the list.
If you delete a record and then hit the "reload" button, the deleted record is still in the list.

Any help in order to solve this problem is appreciated.

Regards.
Miche
Pages: 1 ... 11 12 [13]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!