Jump to content


Photo

Wrong cell after moving a column


  • Please log in to reply
2 replies to this topic

#1 bertrod

bertrod
  • Members
  • 95 posts
  • Gender:Male
  • Location:Switzerland

Posted 31 July 2020 - 09:50 AM

Hello,

 

I found a problem when moving columns in NxGrid6:

 

1. I have a grid with 2 columns and 2 rows

2. I move the 2nd column before the 1st column (either by drag-n-drop or by code by setting NxColumn2.Position := 0

3. I enter a value using NxGrid.Cells[NxColumn2.Position, aRow], but the value is written in the Column 1 instead of Column 2.

 

I attach a sample project, it is easy to reproduce the problem.

 

I'm using version 6.3.2. I checked the release notes but this problem doesn't seem to be fixed.

 

Thank you for your help



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,901 posts
  • Gender:Male

Posted 31 July 2020 - 06:09 PM

Hi,

 

You need to note that when you change Position, real index is still the same. Position is only visual change.

 

Hope this helps.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 bertrod

bertrod
  • Members
  • 95 posts
  • Gender:Male
  • Location:Switzerland

Posted 31 July 2020 - 07:22 PM

Hi Boki,

 

OK now I got it: I need to use TNxColumn.Index instead of TNxColumn.Position.

 

Thank you






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users