求教DataGrid,怎么添加行,添加列,设置单元格里面的内容!

解决方案 »

  1.   

    void   CDlgRecordset::OnButAdd()     
      {   
      //   TODO:   Add   your   control   notification   handler   code   here   
      UpdateData();   
      m_pRecordset->AddNew();   
      m_DataGrid.SetAllowUpdate(true);   
      m_DataGrid.Refresh();   
      //m_DataGrid.GetDataSource();   
      /*BOOL   b_tt;   
      b_tt=m_DataGrid.GetAllowUpdate();   
      int   ii,   jj;   
        
      ii   =   m_DataGrid.GetRow();   
      jj   =   m_DataGrid.GetColumns().GetCount();*/   
      }   
      

  2.   

    必须要结合数据库才能使用Datagrid吗?
      

  3.   

    这是第三方控件吧,看下demo,不行再看下源代码就ok了。