Jump to content

How to delete a column from a stringgrid?


eduardosuruagy

Recommended Posts

3 minutes ago, fcarvalho4 said:

procedure TMainForm.btn1Click(Sender: TObject);
begin
  UniStringGrid1.BeginUpdate;
 try
  UniStringGrid1.Columns.Delete(9);
  UniStringGrid1.ColCount := UniStringGrid1.ColCount - 1;
 finally
  UniStringGrid1.EndUpdate;
 end;
end;

unfortunately it doesn't work, it always takes the last column

Link to comment
Share on other sites

2 hours ago, fcarvalho4 said:

Desculpe, enviei o arquivo zip errado!

 

UniStringGrid.zip

Thank you so much for your help, but I don't think
This is the correct way to delete a column. Imagine I have to delete 10 columns? I will have to keep copying from one StringGrid to another several times. Thank you anyway!!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...