Click here to Skip to main content
15,867,704 members
Articles / Desktop Programming / MFC
Article

Editable Table Control

Rate me:
Please Sign up or sign in to vote.
4.84/5 (26 votes)
19 Aug 2001 203.3K   8.3K   64   28
An editable combo list control

Sample Image - editable_list.jpg

Introduction

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 ).

License

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


Written By
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

 
Generalquestion about ListCtrl EditBox and ComboBox Pin
alla_hpl27-Jan-04 3:22
alla_hpl27-Jan-04 3:22 

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

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