Added support for auto gen json def

Need to refine the Custom_Grid editorOpt of mode (refDoc or subDoc)