Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Grid companent...

Posted on 2005-03-17
6
Medium Priority
?
278 Views
Last Modified: 2010-04-06
Hi,

I need a grid companent that, it will be like excel grids.

I have to write formulas, make alignment, ability make cell border. these may be enough.

Do you know any companent like this?

Thanks.

0
Comment
Question by:koken
6 Comments
 
LVL 15

Expert Comment

by:mikelittlewood
ID: 13565970
You might be able to embed an excel spreadsheet into your app if you use the OLEContainer component and user it just like excel.
Someone else might be able to give you code on how to do this or supply another alternative.
0
 

Author Comment

by:koken
ID: 13565997
Thanks. But it must be without Excel.
0
 
LVL 15

Expert Comment

by:mikelittlewood
ID: 13566018
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 13566325
0
 
LVL 1

Accepted Solution

by:
Dissaster earned 150 total points
ID: 13568009
Maybe the quantum grid from www.devexpress.com can help you. Take a look at them..
0
 
LVL 11

Expert Comment

by:ZhaawZ
ID: 13568244
You may also use TStringGrid ('Additional' tab) and draw contents of cells in onDrawCell event (this is really simple).
Here's a small example:

object StringGrid1: TStringGrid
  Left = 8
  Top = 24
  Width = 561
  Height = 369
  DefaultDrawing = False
  GridLineWidth = 0
  Options = [goEditing]
  TabOrder = 0
  OnDrawCell = StringGrid1DrawCell
end

procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);
var
  s : string;
begin
with StringGrid1, Canvas do begin
  s := Cells[aCol, aRow];
  Pen.Width := 1;
  if gdSelected in State then Pen.Color := $000000 else
  if gdFixed    in State then Pen.Color := $888888 else
  Pen.Color := $dddddd;
  if gdSelected in State then Brush.Color := $eeeeee else
  if gdFixed    in State then Brush.Color := $dddddd else
  Brush.Color := $ffffff;
  Rectangle(rect);
  Brush.Style := bsClear;
  with rect do
  if (length(s) > 0) and (s[1] = '=') then begin
    TextOut(left + (right - left - TextWidth('formula')) div 2, top + (bottom - top - TextHeight('formula')) div 2, 'formula');
  end else begin
    TextOut(left + (right - left - TextWidth(s)) div 2, top + (bottom - top - TextHeight(s)) div 2, s);
  end;
end;
end;

Notice that I've changed three settings for StringGrid1 to make it more "custom":
  DefaultDrawing = False
  GridLineWidth = 0
  Options = [goEditing] (removed )
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses
Course of the Month10 days, 3 hours left to enroll

571 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