ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

How to highlight new row in the grid

Open mohammedshafiq opened this issue 11 years ago • 3 comments

Hi,

I want to highlight a new row added to the grid. I have a grid which refreshes correctly when an event refreshes the data. I do not know what api I should use to achieve this.

I have tried the ui-grid-selection api to try and achieve this but cannot get this to work. Preferably, I do not want to use this but will if I need to.

Any pointers in the right direction?

mohammedshafiq avatar Dec 03 '14 14:12 mohammedshafiq

If you've added your new row at the end, you should be able to use the scrollto api to move the focus to it. To highlight it you would use the selection api to select it.

PaulL1 avatar Dec 03 '14 19:12 PaulL1

Thanks Paul for the reply.

After posting I read a recent post #2267 which has a solution to the issue I amseeing. The solution suggested is to use $timeout which works correctly but is not ideal for obvious reasons.

As you have posted in that thread a render complete event would be ideal for this.

mohammedshafiq avatar Dec 04 '14 08:12 mohammedshafiq

OK, closing as a duplicate then.

PaulL1 avatar Dec 10 '14 06:12 PaulL1