可以的,,
1.定义两个数据源 一个可更新一个不可以更新,
2.3.对datagrid的操作都可以这样  数据源.getchange() 就可以了

解决方案 »

  1.   

    DataGrid绑定DataView,设置dataView属性,
    dataView.AllowNew = false;
    dataView.AllowDelete = true;
    dataView.AllowEdit = true;
    如果要添加数据
    DataTable dt = dataView.Table;
    可以在dt中处理记录的添加删除编辑等。
      

  2.   

    呵呵,zhzuo(秋枫)說得很對,你試試吧!
      

  3.   

    private void AddCustomDataTableStyle()
       {
          DataGridTableStyle ts1 = new DataGridTableStyle();
          ts1.MappingName = "Customers";
          // Set other properties.
          ts1.AlternatingBackColor = Color.LightGray;      /* Add a GridColumnStyle and set its MappingName 
          to the name of a DataColumn in the DataTable. 
          Set the HeaderText and Width properties. */
          
          DataGridColumnStyle boolCol = new DataGridBoolColumn();
          boolCol.MappingName = "Current";
          boolCol.HeaderText = "IsCurrent Customer";
          boolCol.Width = 150;
          ts1.GridColumnStyles.Add(boolCol);
          
          // Add a second column style.
          DataGridColumnStyle TextCol = new DataGridTextBoxColumn();
          TextCol.MappingName = "custName";
          TextCol.HeaderText = "Customer Name";
          TextCol.Width = 250;
          ts1.GridColumnStyles.Add(TextCol);      /* Add the DataGridTableStyle instances to 
          the GridTableStylesCollection. */
          myDataGrid.TableStyles.Add(ts1);
       }