ucoGrid, a great grid control of MFC
UcoGrid is develped from CGridCtrl, and provides more exciting features.
CGridCtrl is a great ctrl developed by Chris Maunder, which can display and edit tabulated data and support custom defined cell type. The lastest version is Here.
Many developers have created their new cells and developed new feathers for CGridCtrl. such as, merging and unmerging cells, printing and print preview support, etc.
Unfortunately these features have not yet been added to CGridCtrl. My main goal is to combine and improve them into one stable “ucoGrid” control. So far, most of the takses have been complete, and the develop the DrawCell and FormulaCell is in process now. Since there’s no schedule set to accomplish these tasks, it can take a long time. Any suggestion or advice are appreciated.
Changes log
-
2006.07.10 Project stated, and it was named ucoGrid.
-
2006.07.12 add the cell merge and unmerge to CGridCtrl 2.6, and call it ucoGrid(develop code).
-
2006.07.13 add the print preview for class CGridCtrl. The print preview code comes from “Print Previewing without the Document/View Framework” by Koay Kah Hoe.
-
2006.07.25
-
fixed the bugs when insertcolumn or insertrow. (by Niko Shi)
-
fixed the bug when set the column width to Zero or the row height to zero, the column or the row can’t hide. (by Tobert )
-
fixed the bug: the check box on the fixed cell can’t work well.
-
minor fixed (by C++ Hacker)
-
-
2006.07.26
-
fixed the bug when merge cells in whick some are already megerd.(by hamo, http://www.ucosoft.com//)
-
ToDo List
-
Add the merge and unmerge support the CGridCtrl ver 2.6. Huang Wei provide a modified version on CGridCtrl ver 2.4(here) and some other developers have given some good advice and fixed some bugs.[done] -
More humanful Print and Print Preview support[done] -
More Cell types. (Multiline text item)
Download
- ucogrid-src.zip(last update: 2006/11/28)
good
you are greate,and greate job!!this modified CGridCtrl is suite for me!!thanks a lot!!
CGridCtrl 8232:
pFrameWnd->SetWindowText(_T(”Koay Kah Hoe Print Preview”));
======
CWnd* pWndPopupOwner = this;
while (pWndPopupOwner->GetStyle() & WS_CHILD)
pWndPopupOwner = pWndPopupOwner->GetParent();
CString title=”";
if(pWndPopupOwner)
pWndPopupOwner->GetWindowText(title);
CViewPrintPreview 95:
GetParentFrame()->ShowWindow(SW_HIDE);
=======
CWnd* pWndPopupOwner = this;
while (pWndPopupOwner->GetStyle() & WS_CHILD)
pWndPopupOwner = pWndPopupOwner->GetParent();
if(pWndPopupOwner) pWndPopupOwner->SetFocus();
GetParentFrame()->DestroyWindow();
CGridCtrl 8232:
pFrameWnd->SetWindowText(_T(”Koay Kah Hoe Print Preview”));
======
CWnd* pWndPopupOwner = this;
while (pWndPopupOwner->GetStyle() & WS_CHILD)
pWndPopupOwner = pWndPopupOwner->GetParent();
CString title=”";
if(pWndPopupOwner)
pWndPopupOwner->GetWindowText(title);
pFrameWnd->SetWindowText(title)
CViewPrintPreview 95:
GetParentFrame()->ShowWindow(SW_HIDE);
=======
CWnd* pWndPopupOwner = this;
while (pWndPopupOwner->GetStyle() & WS_CHILD)
pWndPopupOwner = pWndPopupOwner->GetParent();
if(pWndPopupOwner) pWndPopupOwner->SetFocus();
GetParentFrame()->DestroyWindow();
hello,zhang_zkun. Is there any bug you found?
I use it in DLL, and I Detected memory leaks.
I think the problem is in CGridCtrl 8214 line;
there we “new CSingleDocTemplate”,but not “delete it”
if we use “GetParentFrame()->DestroyWindow()” at CViewPrintPreview 95 line, It’s OK.
oh, It works well. Thank you, zhang_zkun.
I suggest small corrections in description:
ex: “But these features have not been add to CGridCtrl. So I want to integer all the features into CGridCtrl and improve some cells. There is no time plan and it may take a long time.”
should look like:
Unfortunately these features have not yet been added to CGridCtrl. My main goal is to combine and improve them into one stable “ucoGrid” control. Since there’s no schedule set to accomplish these tasks, it can take a long time, before it is completed, assuming that it will ever be (by means of constant development).
For me merging doesn’t work when in virtual mode. I’ve tested it with the compiled binary included in the latest ucoGrid.
Thank you for sharing!
Congratulations to all for the great software of CGridCtrl
the code placed by Niko Shi to solve the insertcolumn problem would better be place some lines earlier.
in my version
CGridctrl line 4290
////change STARTS here Other place
// fix up column order
m_arColOrder.resize(m_nCols); // Reset Column Order
for (int i = 0; i < m_nCols; i++)
{
m_arColOrder[i] = i;
}
//// change ENDS here
moved to line 4275
after m_nCols++
Reason: When adding the very last column in the grid there was still a problem writing his fixedcolumn title.
replacement of the code solves this.
Probably somebody can add this change.
Many thanks
elsfv
It cannot compile in vc2005/2008, Why?
@fly:
I have compiled the project in vc2005, and there is no error appears. So what about your error message?
How to customize the line around the CELL? For example, I just want to draw top line only. How can this control do this?
Thanks,