Forum:Elder Wand

If Grindelwald had the Elder Wand (undefeatable) how was he defeated by Dumbledore for him to take posession?