How can I validate the grid in a dialog?

You should insert DDV_GXGridWnd( ) in the CDialog DoDataExchange( ) method:

// validation routine for CGXGridWnd controls
DDV_GXGridWnd(pDX, GetGridWnd( ));
// - OR -  validation routine for CGXTabWnd controls
DDV_GXTabWnd(pDX, GetTabWnd( ));
// - OR -  validation routine for CGXGridHandleWnd controls
DDV_GXGridHandleWnd(pDX, GetGridWnd( ));