Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6053017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:59:32+00:00 2026-05-23T07:59:32+00:00

Firstly is this possible? I have two issues – the fist is that I

  • 0

Firstly is this possible?

I have two issues – the fist is that I cannot get the groups to appear in the TListView when creating at run time. I’m using the following code:

lg := lvResults.Groups.Add;
lg.Header := 'New Starters';
lg.GroupID := 0;

The second is that even if I create groups at design time – I can see them in the form designer – they are absent in at run time – even before I refresh the data to add my own Items…

Additional:
I have confirmed the answer below works on a virgin project. However it fails in the Project where I want to use it! I have replaced my TListView with a new one from the palette and no joy. The list view is on a tpagecontrol

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:59:33+00:00Added an answer on May 23, 2026 at 7:59 am

    The code below results in visible groups. Are you perhaps forgetting to set GroupView to True?

    procedure TMyForm.FormCreate(Sender: TObject);
    var
      Group: TListGroup;
      Item: TListItem;
    begin
      ListView1.ViewStyle := vsReport;
      ListView1.GroupView := True;
      ListView1.Columns.Add.Caption := 'My column';
      Group := ListView1.Groups.Add;
      Group.Header := 'My header';
      Item := ListView1.Items.Add;
      Item.GroupID := Group.GroupID;
      Item.Caption := 'My item';
    

    There is an code example in the Delphi documentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Firstly: I am totally a newbie for this kind of work. I have a
Firstly, I do not have any malicious intent out of this question. I would
I have a system that builds up reports on incedents. This allows the users
I have no idea if this is possible but is there a way in
Firstly, please forgive me if I have asked this before (i suffer memory problems
my question has two parts, but they are related. Firstly - I have Contenteditable
Is it possible to do Virtual Machine(VM) provisioning? Firstly I have a some questions
Possible Duplicate: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive Firstly, let me
Ok, firstly this is not about forms this is about consistent layout as a
Firstly, This might seem like a long question. I don't think it is... The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.