Solved

TStringGrid

Posted on 2001-08-23
5
167 Views
Last Modified: 2010-04-06
i have a StringGrid and i want in runtime to delete a column! (or to move it to the end and then to do coulcount:=colcount-1 => deleted)
how can i do it?
0
Comment
Question by:ntony
  • 3
  • 2
5 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6416721
for i := delIndex to stringgrid1.colcount -2 do
  stirngrid1.columns[i].assign(stirngrid1.columns[i+1]);
stringgrid1.colcount := stringgrid1.colcount-1;

delindex is the zerobased index of the column which is to delete

just from head (not tested, typos possible)

meikl ;-)
0
 
LVL 1

Author Comment

by:ntony
ID: 6416747
error
StringGrid.Columns[i]   // undeclared identifier 'columns'
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
ID: 6416772
as said typos possible
(because i have no delphi on hand)
try
cols
instead

meikl ;-)
0
 
LVL 1

Author Comment

by:ntony
ID: 6416796
tanks it's working
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6416806
glad to helped you :-)
good luck again

meikl ;-)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 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

20 Experts available now in Live!

Get 1:1 Help Now