styling causes slow JS

In my grid, I do some sorting and style several columns with a set of few hundred rows and sometimes the browser kicks out this JS warning,

“Stop running this script? A script on this page is causing your web browser to run slowly…”

It seems to be the styling. This error is intermittent in either firefox or IE.

Has anyone experienced any browser performance issues when using styling?

It seems to be the styling.
If you are setting styles for each cell it may require quite a lot of operations.
Which code you are using to assign styles?