Local current information in nanodevices is very helpful for good understanding the fundamental physical phenomena. In this work, the electron motion in 2DEG under a local gradient magnetic field is studied by the recursive non-equilibrium green's function method. The considered structure is a sandwiched configuration, lead-device-lead. For clearly observing the electron trajectories, we use the wide and narrow leads to contact the device respectively. The results show that in wide lead case, the quantized conductance plateaus with oscillations are found. These oscillations might be related to the resonant transmission in longitudinal electronic states. We also observe several typical snake electron orbits when the corresponding incident energy locates at the odd conductance plateaus, because there is exactly one opened transport channel around the horizontal middle line of device. When we shrink the width of leads and let electrons inject only from the lower half of device, the conductance suppression is very significant due to the energy level broadening in center device. In this case, we can find clear S-shape and 8-shape electron orbits at a very wide range of energy. These results can help us to understand the basic physics in 2D electron systems and may guide the design of future photoelectric device.