Solved

Grid - show hide cell

Posted on 2002-04-23
2
810 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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

856 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