BindingManagerBase.RemoveAt メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)



RemoveAt メソッドは、基になるデータ ソースに依存して、メソッドの動作方法を決定します。サポートされているデータ ソースの一覧については、Binding クラスのトピックを参照してください。IList、IBindingList、ITypedList を実装するクラス、および IList を実装する厳密に型指定されたクラスについては、RemoveAt メソッドは、実際には基になるリストの内容を置換するのではなく行を削除します。
基になるリストに IBindingList インターフェイスが実装されている場合は、AllowRemove プロパティが true を返す必要があります。基になるリストに IList インターフェイスが実装されている場合は、IsFixedSize プロパティが false を返す必要があります。

Private Sub button1_Click(sender As Object, e As EventArgs) Try ' Get the 'BindingManagerBase' object. Dim myBindingManagerBase As BindingManagerBase = BindingContext(myDataTable) ' Remove the selected row from the grid. myBindingManagerBase.RemoveAt(myBindingManagerBase.Position) Catch ex As Exception MessageBox.Show(ex.Source) MessageBox.Show(ex.Message) End Try End Sub 'button1_Click
private void button1_Click(object sender, System.EventArgs e) { try { // Get the 'BindingManagerBase' object. BindingManagerBase myBindingManagerBase=BindingContext[myDataTable]; // Remove the selected row from the grid. myBindingManagerBase.RemoveAt(myBindingManagerBase.Position); } catch(Exception ex) { MessageBox.Show(ex.Source); MessageBox.Show(ex.Message); } }
void button1_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) { try { // Get the 'BindingManagerBase' Object*. BindingManagerBase^ myBindingManagerBase = BindingContext[ myDataTable ]; // Remove the selected row from the grid. myBindingManagerBase->RemoveAt( myBindingManagerBase->Position ); } catch ( Exception^ ex ) { MessageBox::Show( ex->Source ); MessageBox::Show( ex->Message ); } }
private void button1_Click(Object sender, System.EventArgs e) { try { // Get the 'BindingManagerBase' object. BindingManagerBase myBindingManagerBase = get_BindingContext().get_Item(myDataTable); // Remove the selected row from the grid. myBindingManagerBase.RemoveAt(myBindingManagerBase.get_Position()); } catch (System.Exception ex) { MessageBox.Show(ex.get_Source()); MessageBox.Show(ex.get_Message()); } } //button1_Click

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


Weblioに収録されているすべての辞書からBindingManagerBase.RemoveAt メソッドを検索する場合は、下記のリンクをクリックしてください。

- BindingManagerBase.RemoveAt メソッドのページへのリンク