I found this thread which I thought was pretty neat - https://forums.asp.net/t/1716207.aspx?ViewData+ModelMetadata+Properties+to+display+all+fields+in+a+model+exclude+null+values
I wasn't sure about the solution though as
if (!String.IsNullOrEmpty(prop.PropertyName))
Will always return true. What is suppose to be checked in the if statement to get the value of the property?
(I tried responding directly to the other thread but it's locked.)