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 » Wed Aug 28, 2013 5:22 am

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
Premium Member
Premium Member
Posts: 15621
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: Highlighting a row on tap

Post by mats » Wed Aug 28, 2013 7:13 am

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 » Fri Sep 06, 2013 9:10 pm

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 » Fri Sep 06, 2013 11:16 pm

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
Premium Member
Premium Member
Posts: 15621
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: Highlighting a row on tap

Post by mats » Sun Sep 08, 2013 5:10 pm

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 » Fri Sep 13, 2013 5:03 pm

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: 3405
Joined: Mon May 16, 2011 10:48 am

Re: Highlighting a row on tap

Post by nickolay » Mon Sep 16, 2013 7:51 am

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