I am frequently updating the grid. The problem is that is starts flickering a lot. Is there a way to turn 1 off the flickering?

Yes, you can tell the grid to draw to a memory device context. This will be a bit slower than drawing direct to the device context, but will look much smoother. There will be absolutely no flickering any more.

To enable this special mode, you should call

   SetDrawingTechnique(gxDrawUsingMemDC);