EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: mazvv on March 22, 2014, 11:31:58 AM



Title: Combogrid column formatter
Post by: mazvv 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