1. ?CGridCtrl 没有这个功能,它不能横向的分页
2. virtual mode 如果我没有理解错的话应该和 msdn 中的Virtual List Controls是一个意思,是指grid列表中只填充显示的那些数据,而那写不显示的数据保存在一个数组中,in msdn (Virtual List Controls)A virtual list control is a list view control that has the LVS_OWNERDATA style. This style enables the control to support an item count up to a DWORD (the default item count only extends to an int). However, the biggest advantage provided by this style is the ability to only have a subset of data items in memory at any one time. This allows the virtual list view control to lend itself for use with large databases of information, where specific methods of accessing data are already in place.
.....

解决方案 »

  1.   

    还有一个问题,如何让CGridCtrl移动到刚刚加入的行的位置?
      

  2.   

    int nRow = GetFocusCell().row;
    int nCol = GetFocusCell().col;
    int nCnt = GetRowCount();
    CString content = "新行";
    if (nRow >= 0)
    {
       if( nRow == nCnt-1 ) 
       {
    if(updown == 0)//在nRow后insert
       InsertRow(content, -1);
    else//在nRow前insert
       InsertRow(content ,nRow);
       }
      else
      {
           if( updown == 0)//在选定行后插入新行
    ++nRow;
           InsertRow(content, nRow);
       }
       Invalidate();
    }
    nRow为新行,由nRow不是可以移动CGridCtrl中行的位置