Highlighting a row on tap

Questions related to our Sencha Touch based grid component
Post Reply
User avatar
jeanmanuel
Posts: 5
Joined: Tue Apr 23, 2013 4:46 pm

Highlighting a row on tap

Post by jeanmanuel »

Hello, i'm trying to have a row highlighted when a user select it. How could I do this, would you have an example?
Thanks
jean-Manuel

User avatar
mats
Core Developer
Core Developer
Posts: 16716
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: Highlighting a row on tap

Post by mats »

Currently this is not supported, but it's on our roadmap. Based on the params you receive:

http://www.bryntum.com/docs/ubergrid/#! ... ent-rowtap

you can get the row element (use Firebug to see the DOM structure) and do e.getTarget('.ubergrid-row') and simply add a CSS class on it.
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
osolano
Posts: 27
Joined: Sat Jun 15, 2013 2:44 pm

Re: Highlighting a row on tap

Post by osolano »

I would also like to request this feature.

The ability to either highlight a row or include a radio button would be perfect for me.

User avatar
osolano
Posts: 27
Joined: Sat Jun 15, 2013 2:44 pm

Re: Highlighting a row on tap

Post by osolano »

mats,

Could you explain how to get the target element? Looking at the event, there is no parameter that will help get the specific row dom. It only has row and cell index data.

User avatar
mats
Core Developer
Core Developer
Posts: 16716
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: Highlighting a row on tap

Post by mats »

You have the DOM 'event' so you can ask for its target. http://docs.sencha.com/touch/2.2.1/#!/a ... -getTarget
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
osolano
Posts: 27
Joined: Sat Jun 15, 2013 2:44 pm

Re: Highlighting a row on tap

Post by osolano »

Thanks mats,

This helped and worked for me. Similar to this idea, any thoughts on how to implement a checkbox to the list?
I was thinking about adding an additional column that would turn on or off a checkbox when clicked and would probably like to use the sencha checkbox image.

Any thoughts?

User avatar
nickolay
Core Developer
Core Developer
Posts: 3466
Joined: Mon May 16, 2011 10:48 am

Re: Highlighting a row on tap

Post by nickolay »

Create a boolean field in the model and a renderer, that can render a checkbox in 2 states. Depending from the state (checked/unchecked) add an according css class to the cell. In the "tap" handler update the boolean field value - row will be refreshed.
We offer training in both Ext JS and our products, read more here.
Read the API documentation

Post Reply