welding a fireplace grate?

I've always been told and seen it work, that if you heat cast iron up first you can weld it. Throw that sucker in the fire get it cherry hot, then weld. LOL

Hopefully the professionals will chime in.