Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread Grid customisation
Wed, Jul 31 2013 11:19 AMPermanent Link

Matthew Jones

Is there a way for me to affect the display of grid cells?
I have a grid attached to a datasource. One of the columns in the datasource is
"summary", which indicates that this row is a summary row, and I'd like to
highlight this with a different background colour.

I cannot though find an event that allows me to customise this, even to choose a
different cell type.

For the primary column, I've changed its background colour to be a gray, so it
looks "fixed", but customisation of rows seems to be lacking. Is this the case? Any
suggestions on how to achieve my purpose?

/Matthew Jones/

(I just realised that I used the British "customisation" and the USA "gray", so
please forgive such translation issues!)
Wed, Jul 31 2013 11:42 AMPermanent Link

Raul

Team Elevate Team Elevate

Look at Grid and it's Columns collection - it does allow color and
control type changes.

Raul


On 7/31/2013 11:19 AM, (Matthew Jones) wrote:
> Is there a way for me to affect the display of grid cells?
> I have a grid attached to a datasource. One of the columns in the datasource is
> "summary", which indicates that this row is a summary row, and I'd like to
> highlight this with a different background colour.
>
> I cannot though find an event that allows me to customise this, even to choose a
> different cell type.
>
Wed, Jul 31 2013 11:48 AMPermanent Link

Matthew Jones

And can I find out how high a row is? I can get a RowCount, but to set the height
of the grid to match, I need the height. It appears to be there in the read-only
protected RowHeight, but it is not exposed.

/Matthew Jones/
Wed, Jul 31 2013 11:50 AMPermanent Link

Matthew Jones

Yes, but there is no event to modify it per-row. Or would it be safe to use the
dataset events? Seems pretty dodgy to me to adjust the columns of a grid as it
reads the dataset.

/Matthew Jones/
Wed, Jul 31 2013 1:11 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< Is there a way for me to affect the display of grid cells?  >>

Not per-row, no.  I'll be working on this in an upcoming build, though.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Aug 1 2013 9:09 AMPermanent Link

Matthew Jones

>  It appears to be there in the read-only
> protected RowHeight, but it is not exposed.

I made it public, and it works. Would be nice to have this formally exposed,
perhaps with a value to indicate the header height or other chrome.

/Matthew Jones/
Sat, Aug 17 2013 7:28 AMPermanent Link

Uli Becker

Tim,

> Not per-row, no.  I'll be working on this in an upcoming build, though.

That would be an important feature. I need it quite often. Please think
about adding it quite soon. Smiley

At the moment I create a html-table on the fly and load it into a TPage
component. (See attached screenshot). Just a workaround - but the look
and feel is not perfect and it flickers a lot when changing the content. Smile

Another workaround would be to create a sort of grid by using panels.

Regards Uli






Attachments: Clip3.png
Sat, Sep 27 2014 2:36 PMPermanent Link

Uli Becker

Matthew,

<<I
made it public, and it works. Would be nice to have this formally exposed,
perhaps with a value to indicate the header height or other chrome.
>>

I'd like to enlarge the rowheight of a TGrid and found this old post from you.
Do you mean, that you were able to change the grid's RowHeight? If so, can you give me a hint what you changed in the sources?

Thanks Uli
Mon, Sep 29 2014 4:14 AMPermanent Link

Matthew Jones

Uli Becker wrote:

> Do you mean, that you were able to change the grid's RowHeight? If
> so, can you give me a hint what you changed in the sources?

I can't remember the details, but you can just edit the framework
source to suit your needs.

> It appears to be there in the read-only protected RowHeight, but it
> is not exposed.

I would think that I just commented it out in the protected section,
and moved it to public. I tend to add comments with my initials so I
can repeat them.

After editing the framework, you must restart the IDE as it caches it.

And finally, I understand EWB version 2 will eliminate this need by
allowing more flexibility, when it is out.

--

Matthew Jones
Mon, Sep 29 2014 1:09 PMPermanent Link

Uli Becker

Matthew,

> I can't remember the details, but you can just edit the framework
> source to suit your needs.
> I would think that I just commented it out in the protected section,
> and moved it to public. I tend to add comments with my initials so I
> can repeat them.

I was able to do that, but changing the value doesn't change the real
rowheight.

> And finally, I understand EWB version 2 will eliminate this need by
> allowing more flexibility, when it is out.

You are right - no need to workaround these issues. Let's hope that v
2.0 will come out soon.

Uli
Image