PDA

View Full Version : How to change the color of cell when user clicks on it



jubiraco
30 Aug 2010, 11:10 AM
Hi there,

how can I change the color of a cell in a Grid when user clicks on it?

My question is pretty straightforward, but I'm not able to solve it :(

Thank you and sorry for my poor english,

Best Regards

-- UPDATE --
I found this
http://www.sencha.com/forum/showthread.php?25279-Change-cell-color-by-click-event&p=507044#post507044

But it didn't solve my problem because I have assigned a value to renderer property when I create my ColumnModel and is not possible (well, I think is not :P) assign one more function to renderer property.

Sorry for my poor english,
Tks =D

jubiraco
31 Aug 2010, 10:56 AM
I found a solution for my problem.

Inside the listener method, I used e.getTarget() to get a reference to an Ext.Element object and then I added a CSS class to the target =)

Well, I hope this solution be useful for someone.

See you!

Sorry for my poor english