To make it work from the DX6i, you first need to associate the switch you're using for gear with a radio channel (probably the Gear channel).
Your dongle will map that radio channel to a Windows game controller input.
Finally, on the RealFlight side you need to make sure that the Controller Profile has that particular game controller input mapped to RealFlight channel 7 "Smoke". (Many of the models use that Smoke channel to control the landing gear.)
If that dongle is a Spektrum WS1000 or WS2000, then the writeup I have here
will help quite a bit. If it's a different dongle, then the writeup will help show you what to do, but the exact game controller inputs may vary.