Jump to content


jaimak

Member Since 17 Aug 2011
Offline Last Active Aug 07 2019 05:37 PM
-----

Topics I've Started

NextGrid6.Columns.Move, wrong Indices ?

07 August 2019 - 11:30 AM

Hello Boki,

 

I was confused, if I use NextGrid.Columns.Move at the run time

 

- NextGrid.Columns.Move(CurIndex: Integer, NewIndex: Integer) with CurIndex = CurrentIndex

 

- NextGrid.Columns.Move(1,3); --> Column on position 1 is to be moved to column 3, but column 3 is moved to position 1, column 1 is now column 2

 

- NextGrid.Columns.Move(3,1); --> Column on position 3 is to be moved to column 1, but column 1 is moved to position 3, column 3 is now column  2

 

- it is not a big problem, but it make confused

 

- and it use a NextGrid.Refresh too, to show the changes 

 

  NextGrid.Columns.Move(3,1);

  NextGrid.Refresh;

 

Greetings and congratulations on your child

Jaimak


NextGrid6.Columns.Delete ?

06 June 2019 - 01:11 PM

Hello,

 

I have a Grid with 6 Columns (Column1.. Column6) and I want delete Column2 and Column4, depend of cell content of this Columns, but it deleted erverytime the last 2 columns.

 

NextGrid.Columns.Delete(const Index: Integer); --> Index is not index/position of Column ?

 

What I make wrong?

 

source:

  for c := AColumn2 downto AColumn1 do
    begin
      b := false;
      for r := 0 to NextGrid.RowCount - 1 do
        begin
          if (ANextGrid.Cell[c,r].AsFloat = AValue) then begin b := true; Break; end;
        end;
      if b then NextGrid.Columns.Delete©;
    end;