EasyUI Forum
November 04, 2025, 10:13:07 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: I need to change the iconCls property of datagrid toolbar at runtime  (Read 12232 times)
jmansur
Newbie
*
Posts: 31


View Profile
« 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
« Last Edit: August 05, 2015, 07:00:12 AM by jmansur » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 05, 2015, 06:35:21 AM »

You may need to describe your issue in more detail.
Logged
jmansur
Newbie
*
Posts: 31


View Profile
« Reply #2 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
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: August 05, 2015, 08:31:20 AM »

Please re-create the linkbutton with another 'iconCls' property value.
Code:
$('#idExportarExcel').linkbutton({
  iconCls: ...
});
Logged
jmansur
Newbie
*
Posts: 31


View Profile
« Reply #4 on: August 06, 2015, 10:31:26 AM »

spectacular.
thank you.
Best Regardsss
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!