EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: jmansur on August 05, 2015, 06:05:21 AM



Title: I need to change the iconCls property of datagrid toolbar at runtime
Post by: jmansur on August 05, 2015, 06:05:21 AM
Hi. Excuse my poor English.
I neet to change the icon, of one option of the datagrid toolbar based on a condition .
I dont know, how to do this.
Somebody help me?
Thankssss


Title: Re: How to change an icon
Post by: stworthy on August 05, 2015, 06:35:21 AM
You may need to describe your issue in more detail.


Title: Re: How to change an icon
Post by: jmansur on August 05, 2015, 06:38:30 AM
I have this toolbar in my datagrid.
                                {
               id:'idExportarExcel',
               text: 'Exportar a Excel',
               iconCls: 'icon-excel_16',
               handler: function(){
                     window.open( $('#tt').html());
                     window.open('data:application/vnd.ms-excel,' + $('#tt').html());
               }
            },
            {
               id:'idOrdenarPor',
               text: 'Ordenar Por',
               iconCls: 'icon-ordenar_16',
               handler: function(){alert('Ordenar Por')}
            }

I need to change the iconCls propertie of id:'idExportarExcel' at runtime


Title: Re: I need to change the iconCls property of datagrid toolbar at runtime
Post by: stworthy on August 05, 2015, 08:31:20 AM
Please re-create the linkbutton with another 'iconCls' property value.
Code:
$('#idExportarExcel').linkbutton({
  iconCls: ...
});


Title: Re: I need to change the iconCls property of datagrid toolbar at runtime
Post by: jmansur on August 06, 2015, 10:31:26 AM
spectacular.
thank you.
Best Regardsss