Solved

Editable list box with multiple columns

Posted on 1997-05-19
2
168 Views
Last Modified: 2013-11-19
I need to create an editable list box with multiple columns. Similar to a spreadsheet where you can enter data in each column and the corresponding data on each row gets updated when you scroll. How can this be done? Is there a sample source somewhere that I can look at?
0
Comment
Question by:dtan
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
RONSLOW earned 100 total points
ID: 1301665
What you seem to be asking for is a grid cotrol.  VC comes with DBGrid - you can go to the TrueDBGrid web site and upgrade to the better TrueDBGrid (free)

Other than that, I'd start with a CListCtrl rather than a list box.  You can then popup a dialog when the user clicks on a row to allow you to edit any of the columns.  If you really want inplace editing, you'd need to write a bit of code that would respond to left or right mouse clicks, determine the row and column the mouse is over, and create and place an edit box over the cell so you can edit the value.

The better solution if you want inplace editing is to use the grid control that comes with VC (or get the one from the true-grid site).

True DBGrid is at http://www.apexsc.com/truedbgrid.html

0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1301666
Oops - I gave you the URL for the pro version instead of the free one .. go to http://www.apexsc.com/truedbgridstandard.html
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Expand to include initial dialog with two choices. 9 67
List out all word 7 255
sumDigits challenge 9 123
sumHeights2  challenge 7 87
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now