没有  可能楼住要 自己写datagrid控件了

解决方案 »

  1.   

    可以用如下的方式试一下:DataView dv = ds.Tables[0].DefaultView;
    dv.AllowNew = false;
    this.dataGrid1.DataSource=dv;
      

  2.   

    this.dS.Tables[0].DefaultView.AllowNew = false;
    //this.dS.Tables[0].DefaultView.AllowEdit= false;
    this.dataGrid1.DataSource = this.dS_goods.Tables[0].DefaultView
    楼上的不行吗?
      

  3.   

    你可以这样做:
    添加数据源时:
    this.dataGrid1.DataSource=ds.Tables[0];
    CurrencyManager cm = (CurrencyManager)BindingContext[this.dataGrid1.DataSource,this.dataGrid1.DataMember]; 
    DataView dv = (DataView) cm.List; 
    dv.AllowNew = false; //导航时
    private void dataGrid1_Navigate(object sender, System.Windows.Forms.NavigateEventArgs ne)
    {
    if (ne.Forward)
    {
    CurrencyManager cm = (CurrencyManager)BindingContext[this.dataGrid1.DataSource,this.dataGrid1.DataMember]; 
    DataView dv = (DataView) cm.List; 
    dv.AllowNew = false; 
    }
    }
      

  4.   

    DataView dv = ds.Tables[0].DefaultView;
    dv.AllowNew = false;
    this.dataGrid1.DataSource=dv;
    这样完全可以了吧