jQuery EasyUI Forum
May 18, 2013, 01:58:37 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1] 2 3 ... 43
1  General Category / Help for EasyUI / Re: Datagrid : json data containing "records" instead of "rows" on: Today at 12:21:27 AM
Try the 'loadFilter' to change data to what format the datagrid requires.
Code:
$('#dg').datagrid({
loadFilter: function(data){
return {
total: data.total,
rows: data.records
}
}
});
2  General Category / Help for EasyUI / Re: multiple column sort in datagrid on: Today at 12:19:23 AM
The multi-column sorting feature has been posted to our developer team. It will be supported in next version(1.3.4).
3  General Category / Bug Report / Re: EasyUI and JQueryUI Conflict on Resize on: May 17, 2013, 12:50:52 AM
Set 'resizable:true' property for columns, just like this
Code:
<th field="firstname" width="50" resizable="false">First Name</th>

The best way to solve this issue is to use the 'easyui-dialog', please refer to http://jsfiddle.net/vmDP8/11/
4  General Category / Bug Report / Re: EasyUI and JQueryUI Conflict on Resize on: May 17, 2013, 12:19:38 AM
No better way to avoid this conflict. So if you want to use the resizable of jqueryui, you must disable the resizable of easyui.
5  General Category / Bug Report / Re: EasyUI and JQueryUI Conflict on Resize on: May 17, 2013, 12:05:52 AM
Please prevent from using the dialog of jqueryui, use 'easyui-dialog' instead. Or disable the resizable feature for each columns.
6  General Category / Help for EasyUI / Re: Selecting Rows after Merging Cells.... on: May 16, 2013, 07:54:31 PM
Try code below:
Code:
var dg = $('#dgAccounts');
var selected = dg.datagrid('getSelected');  // the selected row
var rowIndex = dg.datagrid('getRowIndex', selected);  // the selected row index
var rows = dg.datagrid('getRows');
for(var x = rowIndex; x<=rowIndex+2; x++){
  var row = rows[x];  // the row data
  console.log(row)
}
7  General Category / Bug Report / Re: datagrid getSelected only works every other time, with merged cells... on: May 16, 2013, 07:45:42 PM
If one row is selected, calling 'getSelected' method will always return the selected record data. Please refer to this example http://jsfiddle.net/wGLFF/. It works fine.

If you want to prevent from event bubbling when clicking a menu item, try the following function.
Code:
    function rowAction(row) {
        return "<a href='#' style='text-decoration:none;' onclick='showMenu(this);event.stopPropagation();'> ...</a>";
    }
8  General Category / Help for EasyUI / Re: Selecting Rows after Merging Cells.... on: May 16, 2013, 06:38:49 PM
A more better way to get rows is calling 'getRows' method, please try code below:
Code:
var rows = $('#dgAccounts').datagrid('getRows');
for(var x = rowIndex; x<=rowIndex+2; x++){
  var row = rows[x];  // the row data
  console.log(row)
}
9  General Category / Bug Report / Re: datagrid getSelected only works every other time, with merged cells... on: May 16, 2013, 06:31:15 PM
What is the '...', providing a simple example may be more appropriate.
10  General Category / Help for EasyUI / Re: Add search functionality in TreeGrid on: May 16, 2013, 12:54:22 AM
Try the code below to do searching.
Code:
$('#rt').treegrid({
queryParams:{
Nominativo: $('#Nominativo').val(), 
Telefono: $('#Telefono').val()
}
});
11  General Category / Help for EasyUI / Re: Datagrid Append getting data from previous row on: May 16, 2013, 12:30:07 AM
Try the code below:
Code:
var dg = $('#dg');
var rows = dg.datagrid('getRows');
var lastIndex = rows.length - 1;
dg.datagrid('appendRow',{seq: rows[lastIndex].seq+10});
dg.datagrid('selectRow', lastIndex+1).datagrid('beginEdit', lastIndex+1);
12  General Category / Help for EasyUI / Re: Datagrid Append getting data from previous row on: May 15, 2013, 08:12:20 PM
Don't clearly know what you want to do. If want to set the column's customized value when end editing a row, try the code below:
Code:
// extend your custom text editor
$.extend($.fn.datagrid.defaults.editors,{
    customtext:{
        init: function(container, options){ 
            var input = $('<input type="text" class="datagrid-editable-input">').appendTo(container);
    input.data('customtext',{options:options});
            return input; 
        }, 
        getValue: function(target){
var value = $(target).val();
var opts = $(target).data('customtext').options;
if (opts.callback){
opts.callback.call(target, value);
}
            return value; 
        }, 
        setValue: function(target, value){ 
            $(target).val(value);
        }, 
        resize: function(target, width){ 
            $(target)._outerWidth(width);
        } 
    }
});

Apply the 'customtext' editor to a column.
Code:
<th data-options="field:'attr1',width:250,editor:{
type:'customtext',
options:{
callback:function(value){
var col = $('#dg').datagrid('getColumnOption','attr1');
col.value = value;
}
}
}">Attribute</th>
13  General Category / Bug Report / Re: Tree node dataformat on: May 15, 2013, 09:01:00 AM
Yes, the updated tree plugin is available from http://www.jeasyui.com/easyui/plugins/jquery.tree.js. Once you get a node data.
Code:
clipboard = t.tree('getData', node.target);
To append it to another node, you can write:
Code:
        t.tree('append', {
            parent: (node ? node.target : null),
            data: [clipboard]
        });
or
Code:
        t.tree('append', {
            parent: (node ? node.target : null),
            data: clipboard
        });
14  General Category / Help for EasyUI / Re: Datagrid Append getting data from previous row on: May 14, 2013, 11:34:44 PM
Call 'getColumnOption' method to get a specified column's option which contains your customized value.

Code:
<th data-options="field:'name',value:'abc',...">
  ...
</th>
Code:
var col = $('#dg').datagrid('getColumnOption', 'name');
var value = col.value;  // get the value defined in 'data-options'
alert(value);
15  General Category / Help for EasyUI / Re: catching click in menubuttons on: May 14, 2013, 10:48:36 AM
Try the code:
Code:
var m = $('#mb').menubutton('options').menu;  // get the menu
$(m).menu({
onClick:function(item){
alert(item.name)
}
});
Pages: [1] 2 3 ... 43
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!