Jump to content


Photo

Start value in NxIncrementColumn


  • Please log in to reply
2 replies to this topic

#1 Luben

Luben
  • Members
  • 116 posts

Posted 26 November 2012 - 12:28 PM

Hi,

I use TNxIncrementColumn in one table to enumerate the byte content. By default TNxIncrementColumn starts the enumeration from 1, but in my case I need to start from 0 or by some other address.

My question is - how I can change the start value (the initial value shown on row 0) of TNxIncrementColumn ?

Thank you.

Best regards,
Luben

#2 eikcam

eikcam
  • Members
  • 23 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 28 November 2012 - 11:18 AM

Luben,

By default NXIncrementColumn is set to the Row number that it is associated with. This is hard coded within NxGrid.pas at line 414.

ctAutoInc: Display.AsInteger := ARow;

I would say the easiest way to overcome your issue is to make the cell a TNumberColumn and calculate it yourself.

Regards,

Dan.

#3 Luben

Luben
  • Members
  • 116 posts

Posted 28 November 2012 - 08:21 PM

Hi Dan,

Pity, I would suggest you add some property to offset the values in the column. The enumeration of objects doesn't start always from 1, probably value 1 works in 95% of cases but it will be great to have something to cover the other 5%.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users