This documentation is archived and is not being maintained.

DataListDesigner.TemplatesExist Property

Gets a value that indicates whether templates associated with the designer currently exist.

[Visual Basic]
Protected ReadOnly Property TemplatesExist As Boolean
[C#]
protected bool TemplatesExist {get;}
[C++]
protected: __property bool get_TemplatesExist();
[JScript]
protected function get TemplatesExist() : Boolean;

Property Value

true if templates exist or the designer is in template mode; otherwise, false.

Example

[Visual Basic] The following code example demonstrates using the TemplatesExist property value to help determine the AllowResize property value. In this case if either the TemplatesExist property or the InTemplateMode property is set to true, the AllowResize property is also set to true. However, if both of these properties are set to false, the AllowResize property is also set to false.

[Visual Basic] 
' Override the AllowResize property so that if 
' templates are not defined, the control cannot be resized.
Public Overrides ReadOnly Property AllowResize() As Boolean
   Get
      Return TemplatesExist OrElse InTemplateMode
   End Get
End Property

[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

DataListDesigner Class | DataListDesigner Members | System.Web.UI.Design.WebControls Namespace

Show: