2010-05-07 6 views

Répondre

3

Non. La grille ne boucle que sur une seule couche de propriétés. La grille MVCContrib ne descend pas de manière récursive dans votre objet.

Si vous regardez le the source:

 foreach(var property in modelMetadata.Properties) 
     { 
      if(!property.ShowForDisplay) 
      { 
       continue; 
      } 

      var column = For(PropertyToExpression(property)); 

      if(!string.IsNullOrEmpty(property.DisplayName)) 
      { 
       column.Named(property.DisplayName); 
      } 

      if(!string.IsNullOrEmpty(property.DisplayFormatString)) 
      { 
       column.Format(property.DisplayFormatString); 
      } 
     } 
+0

assez juste;) Merci. – UpTheCreek

Questions connexes