Frying or grilling a piece of meat does primarily the same job. Because of the high heat of both of these methods, the flavour is sealed into the meat as the outside cooks. This is where the common cooking term of 'sealing the meat' has come from.
Chefs would say that the best and most professional way to cook the steak would be to pan fry it, as this way you can watch it all the time and be able to remove it from the heat as soon as you see it is ready. It is also much easier to move around and make sure nothing burns.
This video is really helpful when it comes to cooking steaks, as the chef has some great tips to let you know when the steak is cooked to how you like it.
I would also suggest frying the steak if you want to add other flavours to it, as the pan can hold sauces and other ingredients as well as the meat. For example if you wanted to have some garlic and onions frying at the same time. This would be very difficult to do under a grill.
Therefore either process would work fine but for ease and better flavour I would advise frying.