Click here to Skip to main content
Click here to Skip to main content

Editable Table Control

, 19 Aug 2001
Rate this:
Please Sign up or sign in to vote.
An editable combo list control
<!-- Article image -->

Sample Image - editable_list.jpg

<!-- Add the rest of your HTML here -->


I had to implement some kind of list representation of a certain product-sell table (Product | Price | ProductID | Amount ). So, I decided to use ListCtrl for that matter. Basically, ListCtrl is fun to play with. One of the styles supported by ListCtrl is called report-view, which is used here. ListCtrl also allow editable entries as one of its styles. Unfortunately, when dealing with report-view, editing is applied only to the first column‘s elements.

My Solution

The solution was to create an Edit window on-demand, on top of the according cell-entry. Then, when done editing, a notification message is sent to parent ListCtrl. Thinking this idea is simple enough, I have also perfected it to create ComboBox on demand for certain cells to narrow the input options ( Such as Product field, which is out of the predefined list of elements ).


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author


Israel Israel
Nir Shilon -
B.Sc. in Mathematics & Computer Science of Tel-Aviv University.
I have worked for the past 2 years in DSPG as a R&D software engineer.
As part of Debugger/Simulator team ( Myself, Anna & Yair).
I basically taught myself MFC and other Win32 programming stuff.

Comments and Discussions

GeneralMy vote of 2 PinmemberChina_NewComer18-Nov-13 6:49 
QuestionScroll bar is black before clicking it Pinmemberbfm8923-Jun-13 17:28 
Questionedit other columns Pinmemberpeoria12330-Apr-13 6:38 
AnswerRe: edit other columns [modified] Pinmemberwy73722-May-13 13:22 
GeneralMy vote of 5 Pinmemberfrankagra29-Nov-11 12:29 
QuestionHow to do sorting Pinmemberchevu6-Jul-09 20:21 
QuestionCBS_DROPDOWN err Pinmemberbala_potty25-Apr-07 5:30 
AnswerRe: CBS_DROPDOWN err PinmemberSnakefoot9-Sep-08 1:34 
When using CBS_DROPDOWN, then a CEdit child control is also created by the CComboBox, which can get focus. The CComboBox is meant to destroy itself when it looses focus to the CListCtrl, but now the CComboBox can loose focus to this child control and will also cause it to destroy itself.
See MFC Grid control for an implementation of a CComboBox that supports CBS_DROPDOWN (Can with minor modifications be used in a CListCtrl).
GeneralRe: CBS_DROPDOWN err Pinmemberbala_potty15-Sep-08 21:17 
GeneralThank you very much!!!! Pinmemberluoky21-Nov-06 0:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150327.1 | Last Updated 20 Aug 2001
Article Copyright 2001 by shilonir
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid