EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: varonica on January 04, 2013, 01:07:59 AM



Title: Append column into datagrid!!!
Post by: varonica on January 04, 2013, 01:07:59 AM

   How can we append/change column into datagrid ? :(



Title: Re: Append column into datagrid!!!
Post by: stworthy on January 04, 2013, 05:46:52 PM
Please refer to http://www.jeasyui.com/tutorial/datagrid/datagrid6.php


Title: Re: Append column into datagrid!!!
Post by: varonica on January 04, 2013, 06:04:04 PM
And how can we append a column ? :( I've tried with "appendColumn" but it didn't work. Please help!! :'(


Title: Re: Append column into datagrid!!!
Post by: stworthy on January 04, 2013, 06:13:07 PM
Please try the following code.
Code:
var columns = $('#tt').datagrid('options').columns;
columns[0].push({
field:'listprice',title:'List Price',width:80,align:'right'
});
$('#tt').datagrid();