View document(database) records

How can i open a document(database) record on the grid in an iframe (or any other method). I want to use document(database) and no other type. I am storing them as varbinary(max). When i click on the document(database) record on the grid it starts downloading it, instead i want to start viewing it. Any help would be much much appreciated