EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: varonica on October 17, 2013, 07:52:13 PM



Title: Toolbar in datagrid
Post by: varonica on October 17, 2013, 07:52:13 PM
Defining toolbar via array is awesome but at the same time i need to add some toolbar too via <div> tag. Can i define both toolbar within <div> tag and array ?

Example:
Code:
//script
$('#dg').datagrid({
toolbar: [{
iconCls: 'icon-edit',
handler: function(){alert('edit')}
},'-',{
iconCls: 'icon-help',
handler: function(){alert('help')}
}],
        toolbar: '#tb'
});

//html
<div id="tb">
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true"/a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-help',plain:true"/a>
</div>

(http://www.jeasyui.com/forum/index.php?action=dlattach;topic=2318.0;attach=450;image)


Title: Re: Toolbar in datagrid
Post by: stworthy on October 18, 2013, 07:32:48 PM
The toolbar property can be an array or a selector, you can only choose one of them.