Step 1) go to sdcard/WhatsApp/Databases.
Step 2) In the Database folder you will see Chat files which are with names similar like msgstore-2014-01-04.1.db.crypt. You may notices the file names have dates as well. but there is a File which is msgstore.db.crypt, we need to rename it. you can add any word before msgstore.db.crypt.
Step 3) After renaming that file, From the other Files just select the file which shows appropriate date before you accidently deleted your whatsapp messages, and then rename that file tomsgstore.db.crypt. This Renaming process can also be done on your PC by Connecting your device.
Step 4) Now the Final step, Goto Setting>Applications>manage applications>Whatsapp and Click on Clear Data. Now open Whatsapp, Choose Restore when it prompts. Thats it, the chat file saved as msgstore.db.crypt will be restored and hence your messages too.
Click on Restore instead of No Thanks
If you have deleted any media file from your chat, its not deleted forever untill you delete it. To view that image or Video goo to sdcard/WhatsApp/Media Where you will find folders with names Whatsapp Audio, Whatsapp images, Whatsapp video, open folder and lookup for your file.