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

  • SEARCH
  • Home
  • 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 8897119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:15:14+00:00 2026-06-15T00:15:14+00:00

I have a TStringGrid say StringGrid1 and one textbox say textbox1 on my delphi

  • 0

I have a TStringGrid say StringGrid1 and one textbox say textbox1 on my delphi form. When I enter anything in textbox1, that comes in next row of the StringGrid1.

I want that the new enteries in StringGrid1 should come on top rather than on bottom. Which property should I change?

  • 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-06-15T00:15:16+00:00Added an answer on June 15, 2026 at 12:15 am

    AFAIK There’s no property you can tweak to insert a row in some position of a StringGrid.

    But, you can always do a shift in code to make space in the grid for a new row.

    Assuming you have a first row and columns of titles, you may code it as:

    procedure TForm1.Button1Click(Sender: TObject);
    var
      I: Integer;
    begin
      StringGrid1.RowCount := StringGrid1.RowCount + 1;
      for I := StringGrid1.RowCount - 1 downto 1 do
        StringGrid1.Rows[I] := StringGrid1.Rows[I - 1];
      StringGrid1.Cols[1][1] := Edit1.Text;
      //the commented line comes from my quick test.
      //Edit1.Text := IntToStr(StringGrid1.RowCount);
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a standard TStringGrid on a form. I have one Fixed Row in
I am running Lazarus 0.9.30. I have a standard TStringGrid on a form and
I have a weird behavior with TStringGrid in Delphi 7. Delphi does not call
Is there a failsafe way of freeing a Delphi control? I have a TStringGrid
I have a TStringGrid where the selected row (max 1, no multi-select) should always
I have a TDataSource that is backed by a TClientDataset bound to a TStringGrid
Hello everybody i have C++ tStringGrid I want to get string from specific cell
Have deployed numerous report parts which reference the same view however one of them
I am working with Lazarus v0.9.30. I have a TForm with a TStringGrid on
I have a application that like firefox, can be enhanced from plugins available from

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.