EasyUI Forum
June 03, 2024, 04:17:17 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Frozen Column Edatagrid  (Read 8274 times)
Punkerr
Newbie
*
Posts: 37


View Profile
« on: February 07, 2013, 03:43:01 PM »

Hi,

I have a little problem here, I tried a lot of ways but frozen columns doesn't work:

Code:
$('#dg').edatagrid({
    title: 'eDataGrid',
    width:400,
    height:250,
    singleSelect:true,
    frozenColumns:[[
        {field:'itemid',title:'Item ID',width:80},
        {field:'productid',title:'Product ID',width:100,editor:'text'},
    ]],
    Columns:[[
        {field:'listprice',title:'List Price',width:80,align:'right',editor:{type:'numberbox',options:{precision:1}}},
        {field:'unitcost',title:'Unit Cost',width:80,align:'right',editor:'numberbox'}
    ]],
    view:detailview,
    detailFormatter: function(rowIndex, rowData){
         return '<div style="padding:5px">' +
                '<p>Attribute: ' + rowData.attr1 + '</p>' +
                '<p>Status: ' + rowData.status + '</p>' +
                '</div>';
    }
    
}).edatagrid('loadData', [
    {"productid":"FI-SW-01","unitcost":10.00,"status":"P","listprice":16.50,"attr1":"Large","itemid":"EST-1"},
    {"productid":"K9-DL-01","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-2"},
    {"productid":"RP-SN-01","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Venomless","itemid":"EST-3"},
    {"productid":"RP-LI-02","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Green Adult","itemid":"EST-5"},
    {"productid":"FL-DSH-01","unitcost":12.00,"status":"P","listprice":58.50,"attr1":"Tailless","itemid":"EST-6"},
    {"productid":"FL-DSH-01","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"With tail","itemid":"EST-7"},
    {"productid":"FL-DLH-02","unitcost":12.00,"status":"P","listprice":93.50,"attr1":"Adult Female","itemid":"EST-8"},
    {"productid":"FL-DLH-02","unitcost":12.00,"status":"P","listprice":93.50,"attr1":"Adult Male","itemid":"EST-9"},
    {"productid":"RP-SN-01","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Rattleless","itemid":"EST-4"},
    {"productid":"AV-CB-01","unitcost":92.00,"status":"P","listprice":193.50,"attr1":"Adult Male","itemid":"EST-10"}
]);

Sworthy, any idea here?? thx in advance!!
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: February 08, 2013, 06:29:55 AM »

Please refer to this example http://jsfiddle.net/xTQ9e/. It works fine.
Logged
Punkerr
Newbie
*
Posts: 37


View Profile
« Reply #2 on: February 08, 2013, 10:55:23 AM »

Thanks sworthy, my bad  Undecided I finished the last frozen column line in comma... big mistake.
Another question, ¿is there another way to put the detail info at the frozen columns side?... default position is behind other rows side.
Logged
Punkerr
Newbie
*
Posts: 37


View Profile
« Reply #3 on: February 11, 2013, 09:43:52 AM »

 ¿Is there another way to put the detail info at the frozen columns side?... default position is behind other rows side.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!