Ok. I have figured out.
In the sequential mode, both reflection and transmission grating is represented by the surface type of "diffraction grating". The position of next surface will tell the computer that the grating is a reflection or a transmission. If the thickness of the grating is positive (+), the next surface will be in the right to the grating. The grating will be a transmission type. If the thickness of the grating is negative (-), the next surface will be in the left to the grating. The grating will be a reflection type.