csharp System.Windows.Forms.DataGridCell类(方法)实例源码

下面列出了csharp System.Windows.Forms.DataGridCell 类(方法)源码代码实例,从而了解它的用法。

作者:.NET开发    项目:System.Windows.Form   
private void PrintCellRowAndCol()
{
   DataGridCell myCell;
   myCell = DataGrid1.CurrentCell;
   Console.WriteLine(myCell.RowNumber);
   Console.WriteLine(myCell.ColumnNumber);
   // Prints the value of the cell through the DataTable.
   DataTable myTable;
   // Assumes the DataGrid is bound to a DataTable.
   myTable = (DataTable) DataGrid1.DataSource;
   Console.WriteLine(myTable.Rows[myCell.RowNumber]
   [myCell.ColumnNumber]);
}


问题


面经


文章

微信
公众号

扫码关注公众号