Depends on grate temp and the texture you want. If your smoke chamber temp is 225* for ribs and you toss whole ears of corn on, figure close to 3 hours if shucked, a bit longer if you close them back up after smearing on some butter and sprinkling seasonings on. Oh, if you leave the husks on, it will help keep the skin on the kernels just a tad more moist and you can mist them a few times to help keep this moisture going as well. If husks are left open or removed, you get direct contact with smoke and it can add some golden-brown color to your corn. If temps are higher, you may want to reduce cooking time to avoid overcooking/drying of the kernels...they can get quite chewy, otherwise.
Eric