如何将原始数据添加到DataGrid中

时间:2016-02-29 16:23:54

标签: c# visual-studio xaml

我需要在我的代码中添加raws。 但我只能添加列。 如何添加原料?

LIMIT

1 个答案:

答案 0 :(得分:2)

 private enum Op {
    case Operand(Double) 
    case UnaryOperation(String, Double -> Double) 
    case BinaryOperation(String, (Double, Double) -> Double)  
}


private var operandStack = [Op]()


private var knownOps = [String: Op]() 


override init() { // initialise the known operations

    knownOps["×"] = Op.BinaryOperation("×", *)
    knownOps["÷"] = Op.BinaryOperation("÷") {$1 / $0}
    knownOps["+"] = Op.BinaryOperation("+", +)
    knownOps["−"] = Op.BinaryOperation("−") {$1 - $0}
    knownOps["√"] = Op.UnaryOperation("√", sqrt) 

    knownOps["x²"] = Op.UnaryOperation("x²" pow(2, pow)    //squared key
  

来源:   http://csharp.net-informations.com/datagridview/csharp-datagridview-add-column.htm