Board index » delphi » Grid control with variable cell types?

Grid control with variable cell types?

What is the JEDI VCL component that could do the following: I want to have a
grid with a variable number of rows.  The data will be generated by code,
_not_ by a data provider; database or otherwise.  Each row will consist of
four fields:

Field 1 - plain text
Field 2 - checkbox
Field 3 - an combo box of colors
Field 4 - A numeric field that allows user entry, or increment/decrement via
a spin button

What's the best VCL component to do this?

thx

 

Re:Grid control with variable cell types?


Quote
In article <3e56795...@newsgroups.borland.com>, Robert Oschler wrote:
> What is the JEDI VCL component that could do the following: I want to have a
> grid with a variable number of rows.  The data will be generated by code,
> _not_ by a data provider; database or otherwise.  Each row will consist of
> four fields:

> Field 1 - plain text
> Field 2 - checkbox
> Field 3 - an combo box of colors
> Field 4 - A numeric field that allows user entry, or increment/decrement via
> a spin button

> What's the best VCL component to do this?

A Tscrollbox with a bunch of frames, one per row, which you create at
run-time.

--
Peter Below (TeamB)  
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be

Re:Grid control with variable cell types?


Hello Robert,

"Robert Oschler" <no_replies@fake_email_address.invalid> wrote in
message news:3e567950$1@newsgroups.borland.com...

Quote
> Field 1 - plain text
> Field 2 - checkbox
> Field 3 - an combo box of colors
> Field 4 - A numeric field that allows user entry, or

increment/decrement via

Quote
> a spin button
> What's the best VCL component to do this?

TClientDataset <g>

Seriously, you can use a TClientDataset in local mode. Setup its field
definitions at design-time and in code use CreateDataset to open it
and add your data to it with Append/Post or AppendRecord. For
optimization turn its LogChanges property to False immediately after
calling CreateDataset.

You can bind any data-aware controls. Borland or 3rd Party on the
clientdataset. You can use either a TDBGrid or a TDBCtrlGrid.

Now, if you are looking for a more complex solution you can use Mike
Lischke's excellent VirtualTree control that can replace trreeviews,
listviews and grids, along with the unit VTEditors i've written for it
that implements various inplace editors.

http://www.delphi-gems.com/VirtualTreeview/VT.php

<KY>

Other Threads