Like any other science, genetics cherishes its stories about its heroes (“Hard to track” Nature 441, 398; 2006). In his published papers (see http://www.mendelweb.org), and in his letters to Carl von Nägeli (C. Stern and E. R. Sherwood The Origin of Genetics; Freeman, 1966), Gregor Mendel makes no mention of discreteness; and he probably never thought about it.
Mendel was lucky that the discrete symbols of algebra agreed with the discrete units of inheritance. Mendel is the founder of genetics for discovering the algebraic laws of biological inheritance, not discreteness. It was Ronald A. Fisher (The Genetical Theory of Natural Selection; Clarendon, 1930) who put Mendel and discreteness on the same page, creating the modern myth by implication.
The discreteness of the modern gene was described by August Weismann as early as 1893, in his classic book The Germ Plasm (Scribner's), which is still in print. In it, Weismann describes units of inheritance, or ‘ids’, as ‘granular’. Fisher was aware of Weismann's ids (R. A. Fisher Science Progress 21, 159–160; July 1926), and probably wanted to shift credit to his fellow mathematician, Mendel.
In The Germ Plasm, Weismann also republishes a drawing by Theodor Boveri, a co-discoverer of meiosis, showing paired units of inheritance arranged in a double row, like beads on a string.