Ext


Go Back   Ext JS Forums > Ext JS Community Forums (2.0) > Ext 2.x: User Extensions and Plugins

Reply
 
Thread Tools
  #701  
Old Today, 10:40 AM
jsakalos's Avatar
jsakalos jsakalos is offline
Ext JS - Support Team
 
Join Date: Apr 2007
Location: Slovakia
Posts: 13,918
jsakalos will become famous soon enough
Send a message via Skype™ to jsakalos
Default

I'd choose another way: Bind the icon to a field and then update the field. Something like: icon-active, icon-disabled (visually faded with no handler).
Reply With Quote
  #702  
Old Today, 10:54 AM
ttbgwt ttbgwt is offline
Ext JS Premium Member
 
Join Date: May 2008
Posts: 78
ttbgwt is on a distinguished road
Default

If I wanted to set the iconClass dynamically, how can I get the specific action component?

Ext.getCmp('id of action icon').setIconClass('new-class');
Reply With Quote
  #703  
Old Today, 02:23 PM
jsakalos's Avatar
jsakalos jsakalos is offline
Ext JS - Support Team
 
Join Date: Apr 2007
Location: Slovakia
Posts: 13,918
jsakalos will become famous soon enough
Send a message via Skype™ to jsakalos
Default

record.set('icon-cls-field-name', 'icon-cls-new-value')
Reply With Quote
  #704  
Old Today, 02:24 PM
quicksilver_in quicksilver_in is online now
Ext User
 
Join Date: May 2009
Posts: 12
quicksilver_in is on a distinguished road
Default Is it possible to switch the editor ?

Hi Saki,

Thanks for such a wonderful plugin.

I have your plugin grid which has a column let's say INDUSTRY.

a) This column needs to be readOnly in the grid view.

b) On edit record action, this column needs to be rendered as a readonly textField ( or just a label) if the field is not dirty.

d) On edit record action, when the row is still dirty , this column needs to be rendered as a comboBox

c) On Add Record action, this column needs to be rendered as a ComboBox, so that user can select one of the industries.

There is a very valid reason to do that, since I need to track the data binding. You can safely assume that the INDUSTRY is my primary key.

How can I really do the above. I really hope this can be done. Any help would be great.

Thanks,
Raj
Reply With Quote
  #705  
Old Today, 02:38 PM
jsakalos's Avatar
jsakalos jsakalos is offline
Ext JS - Support Team
 
Join Date: Apr 2007
Location: Slovakia
Posts: 13,918
jsakalos will become famous soon enough
Send a message via Skype™ to jsakalos
Default

Take a look at ColumnModel::isCellEditable method.
Reply With Quote
  #706  
Old Today, 03:43 PM
quicksilver_in quicksilver_in is online now
Ext User
 
Join Date: May 2009
Posts: 12
quicksilver_in is on a distinguished road
Default

Thanks Saki. I am using columns in-place. Changed the editable:false in the columnModel. I kept the editable:true for the combo-box editor which ofcourse as a result will now only show up in the recordForm panel. I think this is the right direction.

Please let me know if I should do things differently.

Following is the code snippet .

{
                 header:'Industry'
                 ,dataIndex:'combo'
                 ,width:75
                 ,sortable:true
                 ,editable:false
                 ,editor:new Ext.form.ComboBox({
                     store:comboStore
                     ,displayField:'state'
                     ,valueField:'state'
                     ,triggerAction:'all'
                     ,mode:'local'
                     ,editable:true
                     ,lazyRender:true
                     ,forceSelection:true
                 })
            }
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 03:59 PM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.