Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Buttons In Grids
Fri, Mar 18 2016 12:38 PMPermanent Link

squiffy

Telemix Ltd.

Avatar

I want to display a grid where the last column is a small number of controls (for sake of argument let's call them View, Edit, Help - but it really doesn't matter).

These controls, when clicked, need to do something based on the row they are on.

Not sure how to approach it in EWB.

I know I can build up the grid manually if I unbind it then create buttons and make the parent the last column as I add each row, and whilst that adds a button in I'm not sure how to relate that to the row so when it's clicked I can act appropriately.

I think I might be approaching this wrongly, but can't see the wood for the trees today. I don't want to (if I can at all avoid it) have to make them click a check box then an external button to make the selection.

Any help gratefully received, as always.
Fri, Mar 18 2016 2:38 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

<< I want to display a grid where the last column is a small number of controls (for sake of argument let's call them View, Edit, Help - but it really doesn't matter). >>

Do not parent non-grid controls in a grid column.  You're just going to end up with a mess and exceptions, even if it appears to work at first.

You'll need to make controls that specifically *know* that they're in a grid, which requires changing/adding code in the WebGrids unit.  If you want a button control, I will see about adding one to the official releases.

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Mar 18 2016 3:04 PMPermanent Link

squiffy

Telemix Ltd.

Avatar

>>....even if it appears to work at first.

it didn't even appear to work at first Smile

>> If you want a button control, I will see about adding one to the official releases.

I'm using double click for now, but some way to provide a button or link or something would be rather useful to the ecosystem I'm providing. Might want to see if there's any +1's before going to the trouble, as I may be the only one Smile
Sun, Mar 20 2016 6:57 PMPermanent Link

Christian Kaufmann

Tim Young [Elevate Software] wrote:

> You'll need to make controls that specifically know that they're in a grid, which requires
> changing/adding code in the WebGrids unit.  If you want a button control, I will see about adding
> one to the official releases.

That would be great. I have a case where I would like to add something like this as well: One or
more buttons with an icon and an action with that specific row.

cu Christian
Image