Solved

Grid - show hide cell

Posted on 2002-04-23
2
813 Views
Last Modified: 2010-04-04
TAdvStringGrid problem

How to show specific hide cell in grid with button click ?

Thanks.
0
Comment
Question by:cvbmn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6966543
hi,

i don't know about TAdvStringGrid,
but do you mean cell or column
(a cell cannot be hidden,
but you could clear the content)

if you mean column, then move all columns right of the column you will hide one step to left like

function hideAColumn(ColIndex : Integer) : TStringList;
begin
  result := gridname.cols[i]; //return the content of the col, for later restore, if needed
  for i := colindex+1 to gridname.colcount-1 do
    gridname.cols[i-1].assign(gridname.cols[i]);
  gridname.colcount := gridname.colcount - 1;
end;

meikl ;-)
   
0
 
LVL 2

Accepted Solution

by:
vbmn earned 400 total points
ID: 6967586
Specifies the index
property Row: Longint;
property Col: Longint;

Advstringgrid1.Row:=20;
Advstringgrid1.Col:=20;
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

728 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