Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread TGrid: Deleting Rows.
Fri, Jul 10 2015 12:24 AMPermanent Link

Steve Gill

Avatar

I must be going blind because I can't seem to find any way to delete all rows in an unbound grid.  I've looked for DeleteRows, DeleteAllRows, Clear and Empty.  Is there a method for deleting all rows or do I have to do it using a loop?

Thanks.

= Steve
Fri, Jul 10 2015 4:49 AMPermanent Link

Mark Brooks

Slikware

Avatar

Steve Gill wrote:

>>I must be going blind because I can't seem to find any way to delete all rows in an unbound grid.  I've looked for >>DeleteRows, DeleteAllRows, Clear and Empty.  Is there a method for deleting all rows or do I have to do it using a >>loop?

Ditto Steve. I think there are certainly a few bits missing at the moment. I also had to loop. The grid has a lot of potential though. I need an icon column at the very least and "cell changed" event.
Fri, Jul 10 2015 10:43 AMPermanent Link

Raul

Team Elevate Team Elevate

On 7/10/2015 12:24 AM, Steve Gill wrote:
> I must be going blind because I can't seem to find any way to delete all rows in an unbound grid.  I've looked for DeleteRows, DeleteAllRows, Clear and Empty.  Is there a method for deleting all rows or do I have to do it using a loop?

Grid1.RowCount := 0;

Raul
Fri, Jul 10 2015 2:57 PMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Nice tip Raul Smile

On 10-07-2015 16:43, Raul wrote:
> On 7/10/2015 12:24 AM, Steve Gill wrote:
>> I must be going blind because I can't seem to find any way to delete
>> all rows in an unbound grid.  I've looked for DeleteRows,
>> DeleteAllRows, Clear and Empty.  Is there a method for deleting all
>> rows or do I have to do it using a loop?
>
> Grid1.RowCount := 0;
>
> Raul
>

Fri, Jul 10 2015 7:05 PMPermanent Link

Steve Gill

Avatar

<< Grid1.RowCount := 0;  >>

Thanks Raul!

= Steve
Mon, Jan 23 2017 9:06 AMPermanent Link

Matthew Jones

Raul wrote:

> Grid1.RowCount := 0;

I'm just going to comment with DeleteRow as a singular here, because this didn't come up for my search. But now it will for anyone else who wants a DeleteRow that deletes all rows in one go.

--

Matthew Jones
Wed, Jan 25 2017 1:59 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mark,

<< Ditto Steve. I think there are certainly a few bits missing at the moment. I also had to loop. The grid has a lot of potential though. I need an icon column at the very least and "cell changed" event. >>

MyGridColumn.ControlType:=ctIcon;

As for the cell change detection, are you referring to bound or un-bound usage ?

Tim Young
Elevate Software
www.elevatesoft.com
Image