3-prong to 2-prong extension cord/dimmer connections
Setting aside the issue of defeating ground wires, there's a more fundamental problem. 

Actually, the lamp's ground pin is trying to protect you from this mistake. 

Dimming does not work that way

The "transformer" is in fact a digital switching power supply (unless it weighs five pounds, then it really is a transformer, but I doubt it). Either way, dimming will not work with it. 

The transformer will see the dimmed signal as dirty power, which it will try to clean up - getting hot as it does.  Too hot.  

The switching power supply will see the dimmed signal as a brownout or defective power, and work around it - doing its level best to draw rated power anyway.  So the dimming won't work well, and will heat up, overcurrent and burn up the internal electronics of the power supply. 

Both of these are precisely the types of loads which should not be dimmed.  And they put a 3-prong outlet on there, both to safety-ground the power conversion apparatus, and to try to keep you from plugging it into one of those plug-in dimmers on the cord.

How dimming really works on this type of light

Now you haven't said boo about what exact kind it is.  There are low-voltage lights which still use AC and incandescents, and this doesn't apply to them (the idea they need to be dimmed on the low-voltage side applies).  I'm assuming this is a modern light, that is LED, and runs on DC voltage. 

LEDs are actually, internally, run on DC power.  Sometimes fairly high voltage DC, but also sometimes a low voltage in the 11-28 volt range.  Now, if this is a constant-current power supply -- the label will tell, by saying a range of output voltages but one output current -- then the power supply itself needs to do the dimming, by reducing current flow.  It may be possible to change it to one that does that, if the current value is respected.  

Many LEDs lights, especially low-production/specialty/homebrew ones, are actually constant-voltage DC.  They specify 12 or 24 volts DC at a range (or maximum) of output currents.  Tear the individual LEDs are resistors to make them work right on 12 or 24 volts.  These dim using a technique called PWM, and the dimming is on the DC side.  So you need to look for a 12-24V PWM dimmer, and find a form-factor that will let you build it into the LED or cord.