如题!

解决方案 »

  1.   

    m_ctrlDG.SetCol(i);
    m_ctrlDG.SetRow(j);CString str = m_ctrlDG.GetText();其中m_ctrlDG是一个CDataGrid的控件
      

  2.   

    to holyeagle(一杯清茶):
    只能获得字符串吗?
    是i-1行,j-1列吗?
      

  3.   

    看至你项目中的那个C_Recordset类了吗,其实它就对应CAdodc的记录集,得到它,取得行数就可以了,如下:C_Recordset rs = m_oYGAdodc.GetRecordset(); //取CAdodc对应的记录集
    long lRowCount = 0;    //行数
    while(!rs.GetEof())
    {
        lRowCount++;
        rs.MoveNext();
    }