This topic has not yet been rated - Rate this topic

MetaColumn Class

Updated: July 2008

Represents a database column that is used by Dynamic Data.

Namespace:  System.Web.DynamicData
Assembly:  System.Web.DynamicData (in System.Web.DynamicData.dll)
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class MetaColumn : IFieldFormattingOptions

In ASP.NET Dynamic Data applications, the MetaColumn class represents a database field. The MetaColumn class lets you retrieve information about the data field such as type and metadata information.

You can retrieve the table that the data field belongs to by using the Table property. You can also retrieve the data model by using the Model property.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5 SP1

Date

History

Reason

July 2008

Added topic for new class.

SP1 feature change.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
See IsHidden at csharpbits.notaclue.net for a sample

http://csharpbits.notaclue.net/2008/10/dynamic-data-hiding-columns-in-selected.html

public static class ExtensionMethods
{
public static Boolean IsHidden(this MetaColumn column, PageTemplate currentPage)
{
var hideIn = column.Attributes.OfType<HideColumnInAttribute>().DefaultIfEmpty(new HideColumnInAttribute()).First() as HideColumnInAttribute;
return hideIn.PageTemplates.Contains(currentPage);
}
}