-
11 Sep 2011 7:53 AM #1
highlight the newly inserted row
highlight the newly inserted row
Hi
Any idea how to highlight newly inserted row?
i tried to use store's add event and it gives me the record and record index which last inserted.
but how can i reference it to highlight the grid row?
Regards
-
11 Sep 2011 10:22 PM #2Sencha - Community Support Team
- Join Date
- Nov 2007
- Location
- Helsingborg, Sweden
- Posts
- 2,455
- Vote Rating
- 50
Use 'getNode' on the view:
Code:var domNode = grid.getView().getNode(newRecord); Ext.get(domNode).highlight();
-
12 Sep 2011 3:37 PM #3
-
1 Nov 2011 10:29 AM #4
I'm having trbl with this one. I'm using the following code:
If I console.log() the node it shows up correctly. Doing getView().focusRow(i) works as well.Code:Ext.get(grid.getView().getNode(0)).highlight()
When I do the highlight operation multiple times in a row and console.log the node I can see that it's getting styling applied to it, but am not seeing the color change on the grid row. I turned stripeRows to false just to see if that was interfering with the highlight action. I tried frame() as well with no success.
Tried in FF5 and IE8 with 4.0.7. Were you guys having any success with this code?
-
30 Dec 2011 8:53 PM #5
Similar frustrations.
Similar frustrations.
Through trial and error I've figured out how to highlight an updated grid row. In the grid's viewConfig I added a listener for the 'itemupdate' event, and simply highlighted the passed node.
But when I tried the same for the 'itemadd' event it didn't apply the highlighting. No console errors, but no highlighting either. The 'itemadd' record and node arguments are arrays, so I'm iterating through the node array.Code:viewConfig: { listeners: { itemupdate: function(record_updated, row_number, node, options) { Ext.fly(node).highlight(); } } }
It would be great to get highlighting working in 'itemadd' the same way as in 'itemupdate'. Anybody have any ideas?Code:viewConfig: { listeners: { itemupdate: function(record_updated, row_number, node, options) { Ext.fly(node).highlight(); }, // THIS DOESN"T WORK: itemadd: function(records_updated, row_number, nodes, options) { Ext.Array.each(nodes, function(theNode) { Ext.fly(theNode).highlight(); }); } } }
-
30 Dec 2011 10:07 PM #6
Is possible for Editor grid?
After complete the row entry.Can we highlight?
Thanks
-
3 Feb 2013 4:17 AM #7
Proper event on view, when node get inserted. (need to add highlight logic)
Proper event on view, when node get inserted. (need to add highlight logic)
I am facing same kind of problem, unable to get an event on which i should add my code to highlight, which only fires when insertChild for node get invoked and I saw there is some replacement logic in onUpdate method of view, which removes the earlier node in dom so if you just add your code next to inserChild it just gives a blink, which is not intended.
any help will be appreciated.


Reply With Quote