EasyUI Forum
October 17, 2025, 07:14:21 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
1  General Category / General Discussion / Re: Licence Change: GPLv3 to "FreeWare" on: March 07, 2016, 04:45:04 AM
Totally agree with you and for myself has decided to abandon the use of EasyUI 1.4.4 in my Open Source projects
2  General Category / Bug Report / Re: Datagrid formatter problem 1.4.3 on: July 07, 2015, 12:49:56 PM
My full code
Code:
    <table class="easyui-datagrid"
        id="${_id}"
        data-options="
            url:'${request.resource_url(_context, 'list')}',border:false,
            pagination:true,fit:true,pageSize:50,singleSelect:true,
            sortName:'deadline',sortOrder:'asc',
            pageList:[50,100,500],idField:'_id',checkOnSelect:false,
            selectOnCheck:false,toolbar:'#${_tb_id}',
            view: detailview,
            onExpandRow: function(index, row){
                var row_id = 'row-${_id}-' + row.id;
                $('#' + row_id).load(
                    '/tasks/details?id=' + row.id,
                    function(){
                        $('#${_id}').datagrid('fixDetailRowHeight', index);
                        $('#${_id}').datagrid('fixRowHeight', index);
                        $.parser.parse('#' + row_id);
                    }
                );
            },
            detailFormatter: function(index, row){
                var row_id = 'row-${_id}-' + row.id;
                return '<div id=' + row_id + '></div>';
            },          
            onBeforeLoad: function(param){
                param.performer_id = ${h.common.get_auth_employee(request).id};
                $.each($('#${_tb_id} .searchbar').find('input'), function(i, el){
                    if(!is_undefined($(el).attr('name')))
                        param[$(el).attr('name')] = $(el).val();
                });
            }
        " width="100%">
        <thead>
            % if _context.has_permision('delete'):
            <th data-options="field:'_id',checkbox:true">${_(u"id")}</th>
            % endif
            <th data-options="field:'title',sortable:true,width:180">${_(u"title")}</th>
            <th data-options="field:'status',sortable:false,width:60,formatter:function(value, row){return status_formatter(value);}">${_(u"status")}</th>
            <th data-options="field:'deadline',sortable:true,width:110,styler:function(){return datagrid_resource_cell_styler();}">${_(u'deadline')}</th>
        </thead>
    </table>
status_formatter function
Code:
function status_formatter(status){
if(status){
var span = $('<span/>').html(status.title);
span.addClass('status-label ' + status.key);
return $('<div/>').append(span).html();
}
}
functions status_formatter and datagrid_resource_cell_styler does not calls
3  General Category / Bug Report / Datagrid formatter problem 1.4.3 on: July 05, 2015, 09:24:24 AM
Hello.
After update from 1.4.2 to 1.4.3 formatter and styler function for datagrid does not work.
Code:
        <thead>
            <th data-options="field:'status',sortable:false,width:60,formatter:function(value, row, index){return status_formatter(value);}">${_(u"status")}</th>
            <th data-options="field:'modifydt',sortable:true,width:120,styler:function(){return datagrid_resource_cell_styler();}"><strong>${_(u"updated")}</strong></th>
            <th data-options="field:'modifier',width:100,styler:function(){return datagrid_resource_cell_styler();}"><strong>${_(u"modifier")}</strong></th>
        </thead>
I use detailview
4  General Category / Bug Report / Textbox value on: August 19, 2014, 10:00:28 AM
Textbox value initializers only onblur therefore it's not possible submit through Return keyboard button
5  General Category / Bug Report / Re: Datagrid pageNumber bug on: August 17, 2014, 04:08:36 AM
If no data displays in datagrid, the pagination bar will display "Page 0 of 0", just like this example http://jsfiddle.net/6apxbjLq/
But is this right behavior? There was 1 in previous version
6  General Category / Bug Report / Re: Datagrid pageNumber bug on: August 17, 2014, 01:01:55 AM
Please download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4-patch.zip to solve this issue.
Does not work correctly, default page num stays 0. My code is
Code:
    <table class="easyui-datagrid"
    id="${_id}"
        data-options="
            url:'${request.resource_url(_context, 'list')}',border:false,
            pagination:true,fit:true,pageSize:50,singleSelect:true,
            rownumbers:true,sortName:'id',sortOrder:'desc',
            pageList:[50,100,500],idField:'_id',checkOnSelect:false,
            selectOnCheck:false,toolbar:'#${_tb_id}',
            view: detailview,
            onExpandRow: function(index, row){
                var row_id = 'row-${_id}-' + row.id;
                $('#' + row_id).load(
                    '/suppliers/details?id=' + row.id,
                    function(){
                        $('#${_id}').datagrid('fixDetailRowHeight', index);
                        $('#${_id}').datagrid('fixRowHeight', index);
                    }
                );
            },
            detailFormatter: function(index, row){
                var row_id = 'row-${_id}-' + row.id;
                return '<div id=' + row_id + '></div>';
            },         
            onBeforeLoad: function(param){
                $.each($('#${_s_id}, #${_tb_id} .searchbar').find('input'), function(i, el){
                    param[$(el).attr('name')] = $(el).val();
                });
            }
        " width="100%">
        <thead>
            % if _context.has_permision('delete'):
            <th data-options="field:'_id',checkbox:true">${_(u"id")}</th>
            % endif
            <th data-options="field:'id',sortable:true,width:60">${_(u"id")}</th>
            <th data-options="field:'name',sortable:true,width:200">${_(u"name")}</th>
            <th data-options="field:'modifydt',sortable:true,width:120,styler:function(){return datagrid_resource_cell_styler();}"><strong>${_(u"updated")}</strong></th>
            <th data-options="field:'modifier',width:100,styler:function(){return datagrid_resource_cell_styler();}"><strong>${_(u"modifier")}</strong></th>
        </thead>
    </table>
7  General Category / Bug Report / Datagrid pageNumber bug on: August 16, 2014, 10:49:17 AM
Hi.
Seems there is a bug in datagrid in 1.4. The initial value of pageNumber is 0 by default for empty datagrid instead 1.
8  General Category / EasyUI for jQuery / Re: DataGrid Detailview + ajax on: June 26, 2014, 02:23:36 AM
The main problem is height fixing of detailview row container.
Seems I had found good solution to do detailview with ajax, may be this code will be helpful
Code:
            view: detailview,
            onExpandRow: function(index, row){
                var row_id = 'row-${_id}-' + row.id;
                $('#' + row_id).load(
                    '/bpersons/details?id=' + row.id,
                    function(){
                        $('#${_id}').datagrid('fixDetailRowHeight', index);
                        $('#${_id}').datagrid('fixRowHeight', index);
                    }
                );
            },
            detailFormatter: function(index, row){
                var row_id = 'row-${_id}-' + row.id;
                return '<div id=' + row_id + '></div>';
            },         
9  General Category / EasyUI for jQuery / DataGrid Detailview + ajax on: June 24, 2014, 11:57:17 AM
Hi.
I try to use ajax for detailview. Part of my code is
Code:
            
            onExpandRow: function(index, row){
                var row_id = 'row-' + row.id;
                $('#' + row_id).load('/banks_details/details?id=' + row.id);
            },
            detailFormatter: function(index, row){
                var row_id = 'row-' + row.id;
                return '<div id=' + row_id + '></div>';
            },         
it works, but is this right way?
10  General Category / EasyUI for jQuery / Combogrid column formatter on: March 22, 2014, 11:31:58 AM
Hi all.
Have problem with formatter in column of combogrid. My Code
Code:
<input class="easyui-combogrid text w20 combogrid-f combo-f" data-options="
        url: '/regions/list',
        fitColumns: true,
        scrollbarSize: 7,
        border: false,
        delay: 500,
        idField: 'id',
        textField: 'region_name',
        mode: 'remote',
        sortName: 'id',
        sortOrder: 'desc',
        columns: [[{&quot;field&quot;: &quot;region_name&quot;, &quot;formatter&quot;: &quot;function(val, row){return val + \&quot;(\&quot; + row.country_name + \&quot;)\&quot;}            &quot;, &quot;sortable&quot;: true, &quot;width&quot;: 200, &quot;title&quot;: &quot;name&quot;}]],
        pageSize: 50,
        showHeader: false,
        showFooter: true,
        view: bufferview,
        toolbar: '#tb-827044',
        onBeforeLoad: function(param){
            if(null &amp;&amp; typeof(param.q) == 'undefined'){
                param.id = null;
            }
            if(!param.page){
                param.page = 1;
                param.rows = 50;
            }
        }
    " id="827044" type="text">
and got an error:
Uncaught TypeError: Property 'formatter' of object #<Object> is not a function
without formatter function works fine
11  General Category / EasyUI for jQuery / Combobox with pagination on: March 09, 2014, 08:45:54 AM
Hi.
I'm using comboboxes with search and retrieved datas often is too big. For some reasons i can't use cambogrid. Is it possible integrate pagination with combobox?

Thanks in advanced.
12  General Category / General Discussion / Combogrid from markup on: January 02, 2014, 11:37:20 AM
Is it possible to make combogrid from markup? For example I have a datagrid:
Code:
        <table class="easyui-datagrid"
            tal:attributes="url url; id id_datagrid"
            data-options="
                border:false,pagination:true,fit:true,pageSize:50,singleSelect:true,
                rownumbers:true,sortName:'rid',sortOrder:'desc',
                pageList:[50,100,500],idField:'_rid',checkOnSelect:false,
                selectOnCheck:false,toolbar:'#${id_datagrid_toolbar}'
            "
            width="100%">
            <thead>
                <tr>
                    <th data-options="field:'_rid',checkbox:true" i18n:translate="">rid</th>
                    <th data-options="field:'rid',sortable:true,width:60" i18n:translate="">rid</th>
                    <metal:block metal:define-slot="fields">
                    </metal:block>
                    <th data-options="field:'status',width:50,formatter:function(value,row,index){return datagrid_resource_status_format(value);},styler:function(){return datagrid_resource_cell_styler();}"><strong i18n:translate="">status</strong></th>
                    <th data-options="field:'modifydt',sortable:true,width:120,styler:function(){return datagrid_resource_cell_styler();}"><strong i18n:translate="">updated</strong></th>
                    <th data-options="field:'owner',width:100,styler:function(){return datagrid_resource_cell_styler();}"><strong i18n:translate="">owner</strong></th>
                </tr>
            </thead>
        </table>
and I want to make combogrid from it
Thanks
13  General Category / EasyUI for jQuery / Treegrid and onBeforeLoad on: April 14, 2013, 07:41:39 AM
I have a problem with treegrid event onBeforeLoad:
Code:
	<table class="easyui-treegrid" border="false" fit="true"
checkOnSelect="false" selectOnCheck="false"
data-options="
onBeforeLoad:function(row, param){
// param.q = $(this).closest('.container').find('.toolbar .search-tool input.search').val();
param.rid = 1;
return true;
},
onDblClickRow:function(rowIndex, rowData){
$(this).closest('.container').attr('unselectable','on').css('UserSelect','none').css('MozUserSelect','none');
$(this).closest('.container').find('.toolbar a[href=\'${request.route_url('navigations.edit')}\']').click();
}"
url="${request.url}" singleSelect="true" rownumbers="true" idField="rid" treeField="name" toolbar=".toolbar:last">
    <thead> 
        <tr> 
        <th field="_rid" width="40" checkbox="true"
        data-options="formatter: function(value,row,index){return row.rid;}"></th>
        <th field="rid" width="60" sortable="true">ID</th>
        <th field="name" width="160" sortable="true">${_(u'name')}</th>
        </tr> 
    </thead>
</table>

I'm getting error: Uncaught TypeError: Cannot set property 'rid' of undefined
what i'm doing wrong?
14  General Category / EasyUI for jQuery / Re: How to use 'selectRecord' in datagrid ? :( on: March 14, 2013, 01:49:41 AM
Please, see http://jsfiddle.net/qhdcY/1/
I think your problem is idField
15  General Category / EasyUI for jQuery / Re: How to use 'selectRecord' in datagrid ? :( on: March 14, 2013, 01:28:48 AM
Did you tried do simply as in documentation
Code:
$('#mydatagrid').datagrid('selectRecord', idValue);
Please, see http://jsfiddle.net/qhdcY/1/
Pages: [1] 2
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!