Creating a line in a stringrid

Posted on 2005-03-02
Medium Priority
Last Modified: 2010-08-05
I am using a stringrid to display a list of names etc and would like to insert lines at certain points in the stringgrid to separate the data. Can I do this? If so how?

Many thanks in advance

Ps: You do a great job - this is very helpful for someone like me
Question by:newburn
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
  • 3
LVL 26

Assisted Solution

EddieShipman earned 100 total points
ID: 13444310
Set the rowheight of the row between irows to 2 and you'll see a difference.

LVL 11

Expert Comment

ID: 13445495
You could add a new row at the end of your StringGrid and then shift all the values that are under the position you want to highlight.
Or you could paint them in different colours the sections that you need to be differentiated using the event OnDrawCell
LVL 11

Accepted Solution

calinutz earned 150 total points
ID: 13445521
Of course I suggest that you would use a component better than standard TStringGrid, it is called KStringGrid. It is an enhanced StringGrid that allows you to set titles in the middle of the rows to separate groups of data, and many more, such as rowcoloring and a lot more. Try it, it's free and the best for your purpose.
You can download it from here:
LVL 11

Expert Comment

ID: 13445535
and you need to install this first:

After you install both packages you will get the StringGrid that will let you do more stuff like:
"extra features like columns, sorting, quick search, multiline cell values, custom cell editors, advanced drawing capabilities, etc"

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

801 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