Jump to content


Photo

NextVirtualGrid display mismatch with different ColumnTypes

NextVirtualGrid

  • Please log in to reply
6 replies to this topic

#1 OliverI

OliverI
  • Members
  • 4 posts

Posted 02 May 2022 - 07:37 PM

Hi,

 

I used the demo and testet it with different column types.

 

When I am using only TNxTextColumn6 types and set in OnGetCell some columns AsBoolean, AsInteger and AsFloat then the values are not displayed correctly.

 

Do I have to use TNxNumberColumn6 when using AsFloat or AsInteger?

Or why there is a problem when using TextColumn?

 

MyCode is:

 

procedure TForm6.NxVirtualCellSource61GetCell(Sender: TObject; ACol, ARow: Integer; Cell: INxCell);
begin
  var lItem := FList[ARow];
  if ACol = 0 then Cell.AsBoolean := lItem.Col1;
  if ACol = 1 then Cell.AsInteger := lItem.Col2;
  if ACol = 2 then Cell.AsFloat := lItem.Col3;
  if ACol = 3 then Cell.AsString := lItem.Col4;
end;
 
See the attached screenshots.
 
P.S: Please move to NextGrid6 topic

Attached Files



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,070 posts
  • Gender:Male

Posted 03 May 2022 - 10:15 AM

Hi,

 

Can you please send me this demo project, if is not a big hustle. I can check it and modify it little bit if needed. I can also write some comments inside.

 

Yes, different column types expect different As<Type> methods. Number column expect AsFloat, but I'm thinking about adding automatic conversion from int to double.

 

I'm writing new VirtualNextGrid tutorial and I hope it will clarify more things.

 

Best regards


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 OliverI

OliverI
  • Members
  • 4 posts

Posted 03 May 2022 - 06:50 PM

I have send you the demo by mail.

I made two buttons to change the columns.

The first 2 columns have errors.

Scroll to see more errors.



#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,070 posts
  • Gender:Male

Posted 03 May 2022 - 06:56 PM

Thank you, I got the e-mail and will check it now.


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.

#5 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,070 posts
  • Gender:Male

Posted 03 May 2022 - 07:45 PM

Hi,

 

After few adjustments, this is what we get now. Please tell me if is better. Then I can send you the updated files.

 

 

Attached File  Screenshot 2022-05-03 184446.jpg   76.04KB   0 downloads


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.

#6 OliverI

OliverI
  • Members
  • 4 posts

Posted 04 May 2022 - 10:02 AM

Seems to be good  :)



#7 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,070 posts
  • Gender:Male

Posted 05 May 2022 - 11:39 AM

Great :)

I will send you the updated files today.
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.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users