如何将 dataGrid 控件的  Cell[i,j] 赋值?
比如:
dataGrid.CurrentCell[i,j] 是 "abc";现在,俺想变成"sdfsfsfsfbc";
怎么办?

解决方案 »

  1.   

    datagrid 可以直接往上写的啊,
      

  2.   

    dataGrid1.CurrentCell[i,j]="aaaaadfdfdfdf"
    出错:
    D:\TCShare\fun\TSale\sale\Form1.cs(489): 无法将带 [] 的索引应用于“System.Windows.Forms.DataGridCell”类型的表达式
      

  3.   

    int intRow = dataGrid1.CurrentCell.RowNumber;
    int intCol = dataGrid1.CurrentCell.ColumnNumber;
    string newText = dataGrid1[intRow, intCol].ToString();
    dataGrid1[intRow,intCol]="dddd";
      

  4.   

    dataGrid1[dataGrid1.CurrentCell] = "abc";