DataSourceView.CanInsert プロパティ
アセンブリ: System.Web (system.web.dll 内)


CanInsert プロパティには、データ ソース コントロールの機能だけでなく、操作を実行することが現在適しているかどうかも反映されます。たとえば、データ ソース コントロールでは ExecuteInsert 操作がサポートされていますが、必須の挿入コマンドやその他のデータが設定されていない場合は挿入操作が失敗するので、CanInsert プロパティからは false が返されます。

DataSourceView クラスを拡張するクラスで、CanInsert プロパティと ExecuteInsert メソッドをオーバーライドする方法を次のコード例に示します。このコード例は、DataSourceView クラスのトピックで取り上げているコード例の一部分です。
' The CsvDataSourceView does not currently ' permit insertion of a new record. You can ' modify or extend this sample to do so. Public Overrides ReadOnly Property CanInsert() As Boolean Get Return False End Get End Property Protected Overrides Function ExecuteInsert(values As IDictionary) As Integer Throw New NotSupportedException() End Function 'ExecuteInsert

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からDataSourceView.CanInsert プロパティを検索する場合は、下記のリンクをクリックしてください。

- DataSourceView.CanInsert プロパティのページへのリンク