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

Dim instance As DataGridCell Dim returnValue As String returnValue = instance.ToString
行番号と列番号を格納している文字列。

DataGridCell オブジェクトの ToString メソッドを使用して、System.Windows.Forms.DataGrid コントロールの CurrentCell の行番号を返す例を次に示します。
Private Sub DataGrid1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Dim myGrid As DataGrid = CType(sender, DataGrid) Dim myCell As DataGridCell = myGrid.CurrentCell Console.WriteLine(myCell.ToString) End Sub
private void Grid_MouseUp (object sender, System.Windows.Forms.MouseEventArgs e) { DataGrid dg = (DataGrid)sender; DataGridCell myCell = dg.CurrentCell; Console.WriteLine(myCell.ToString()); }

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


- DataGridCell.ToString メソッドのページへのリンク