jmanuelcorral / Sushi

Custom ASP.NET HTMLHelpers based in BootStrap from Twitter
sushi.azurewebsites.net
7 stars 3 forks source link

POCO Object - Nullable field #1

Open marcellobrazil opened 10 years ago

marcellobrazil commented 10 years ago

Hi Manuel,

I changed the Gridhelper class inside BuildBody() method, why when the property value is nullable the conversion of string raise the null reference error.

I change the code from: line 56: td.InnerHtml = property.GetValue(element, null).ToString();

To: td.InnerHtml = string.Format("{0}", property.GetValue(element, null));

jmanuelcorral commented 10 years ago

Hello Marcello,

I'hope this weekend to make the change and create a new build.

Thank you for your time. Regards. José Manuel.