2011-12-27 64 views

回答

0

嘗試這樣:

void test() { 
    int rowIndex = dataGrid1.CurrentRowIndex; 
    DataGridCell cell = dataGrid1.CurrentCell; 
    Console.WriteLine("Current Row Number: {0}, Column Number: {1}", cell.RowNumber, cell.ColumnNumber); 
    Console.WriteLine("Row {0}, Column 0 data: {1}", rowIndex, dataGrid1[rowIndex, 0]); 
} 
相關問題