EasyUI Forum
September 15, 2025, 02:29:27 AM *
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 / edatagrid properties on: April 27, 2012, 08:40:04 AM
Hi everybody,
Can I use all datagrid properties (columns, pagination..) in edatagrid extension or not?

thanks in advance, regards
ciao
h.
2  General Category / EasyUI for jQuery / Problem to edit datagrid on: April 26, 2012, 06:48:11 AM
I've tried to use tutorial example for inline datagrid editing but seems not work, i see the field action added but pushing edit or cancel nothing happen, any idea?

here follow my code:

Code:
$("#tt").datagrid({
                        title: "log",
                        singleSelect:true, 
                            idField:'contratto',
                        url: stringa,
                    columns: [[{field:'utente',title:'Utente', width:80, sortable:true, editor:'text'},
                              {field:'contratto',title:'Contratto', width:80, sortable:true, editor:'text'},
                              {field:'login',title:'Login', width:80, sortable:true, editor:'text'},
                              {field:'piattaforma',title:'Piattaforma', width:80, sortable:true, editor:'text'},
                              {field:'azione',title:'Azione', width:80, sortable:true, editor:'text'},
                              {field:'data',title:'Data - ora', width:80, sortable:true, editor:'text'},
                              {field:'note',title:'Note', width:80, sortable:true, editor:'text'},
                              {field:'action',title:'Action',width:70,align:'center', 
                                    formatter:function(value,row,index){ 
                                    if (row.editing){ 
                                            var s = '<a href="#" onclick="saverow('+index+')">Save</a> '; 
                                            var c = '<a href="#" onclick="cancelrow('+index+')">Cancel</a>'; 
                                            return s+c; 
                                        } else { 
                                            var e = '<a href="#" onclick="editrow('+index+')">Edit</a> '; 
                                            var d = '<a href="#" onclick="deleterow('+index+')">Delete</a>'; 
                                            return e+d; 
                                        } 
                                    } 
                                } 
                             ]],
                             onBeforeEdit:function(index,row){ 
                                 row.editing = true; 
                                 updateActions(); 
                             }, 
                             onAfterEdit:function(index,row){ 
                                 row.editing = false; 
                                 updateActions(); 
                             }, 
                             onCancelEdit:function(index,row){ 
                                 row.editing = false; 
                                 updateActions(); 
                             }, 
                             pagination:true
                    });
                        function updateActions(){ 
                            var rowcount = $('#tt').datagrid('getRows').length; 
                            for(var i=0; i<rowcount; i++){ 
                                $('#tt').datagrid('updateRow',{ 
                                    index:i, 
                                    row:{action:''} 
                                }); 
                            } 
                        } 
                        function editrow(index){ 
                            $('#tt').datagrid('beginEdit', index); 
                        }
                        function deleterow(index){ 
                            $.messager.confirm('Confirm','Are you sure?',function(r){ 
                                if (r){ 
                                    $('#tt').datagrid('deleteRow', index); 
                                } 
                            }); 
                        } 
                        function saverow(index){ 
                            $('#tt').datagrid('endEdit', index); 
                        }
                        function cancelrow(index){ 
                            $('#tt').datagrid('cancelEdit', index); 
                        } 

thanks in advance
ciao
h.
3  General Category / EasyUI for jQuery / create dynamically datagrig on: April 25, 2012, 01:55:26 AM
Does exist a way to create dynamically a datagrid? I mean to post columns and rows with jquery ajax functions like $.post or $.getJSON

thanks in advance
ciao
h.
4  General Category / EasyUI for jQuery / Re: Problem on view datagrid on: April 24, 2012, 08:22:25 AM
ok that's work! thanks stworthy!
5  General Category / EasyUI for jQuery / Problem on view datagrid on: April 23, 2012, 08:38:30 AM
Hi everybody!
I've a problem on view a datagrid in my intranet, data are loaded correctly but column header remain half hidden can you explain me how to resolve it?

thanks in advance.
here follow my symple code:

Code:
    $("#tt").datagrid({
    title: "log",
    url: "./php/log.php",
columns: [[{field:'utente',title:'Utente'},
          {field:'contratto',title:'Contratto'},
          {field:'login',title:'Login'},
          {field:'piattaforma',title:'Piattaforma'},
          {field:'azione',title:'Azione'},
          {field:'data',title:'Data - ora'},
          {field:'note',title:'Note'},
         ]],
         pagination:true
});

and attached a printscreen of the result
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!