DataGridDesigner.GetErrorDesignTimeHtml メソッド
アセンブリ: System.Design (system.design.dll 内)

Dim e As Exception Dim returnValue As String returnValue = Me.GetErrorDesignTimeHtml(e)
戻り値
デザイン時に指定した例外を表示する HTML マークアップ。

GetErrorDesignTimeHtml メソッドをオーバーライドして、例外が発生したときにデザイン サーフェイス上の DataGrid コントロールの外観を変更する方法を次のコード例に示します。
このコード例は、DataGridDesigner クラスのトピックで取り上げているコード例の一部分です。
Protected Overrides Function GetEmptyDesignTimeHtml() As String Dim emptyText As String ' Check the CanEnterTemplateMode property to ' specify which text to display if ItemTemplate ' does not contain a value. If CanEnterTemplateMode Then emptyText = _ "<b>Either the Enabled property value is false " + _ "or you need to set the ItemTemplate for this " + _ "control.<br>Right-click to edit templates.</b>" Else emptyText = _ "<b>You cannot edit templates in this view.<br>" + _ "Switch to HTML view to define the ItemTemplate.</b>" End If Return CreatePlaceHolderDesignTimeHtml(emptyText) End Function


Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- DataGridDesigner.GetErrorDesignTimeHtml メソッドのページへのリンク