In this paper, the design of an inverter control structure based on the Proportional Resonant (PR) controller is dealt with in detail for attaining smooth transitions between the operating modes of a gridconnected microgrid system. The control strategy applied for the inverter is cascaded three-loop control viz., the grid current, voltage across the load, and the inverter output current loops. The inverter control is mainly focused to retain the voltage magnitude within the prescribed set limits and to have a good quality of the voltage across the load under all the modes of operation. A proportional resonant controller is designed by considering the transients and stability criteria into account under varying modes of operation. The design procedure of the Proportional resonant controller is given in detail. The threephase grid-connected microgrid system considered under study is simulated in MATLAB/Simulink environment to operate under islanding condition as well as grid-connected condition and also changing modes from islanding to grid connected and vice versa. The simulation results are presented under various modes of operation to validate the controller design for a smooth transition between the modes of operation.