Jump to content


Photo

Individual RowHeight not stored ?


  • Please log in to reply
6 replies to this topic

#1 didiergm

didiergm
  • Honorable Members
  • 148 posts
  • Gender:Male
  • Location:France

Posted 17 June 2010 - 09:38 PM

There is a property RowHeight which looks like it stored a rowheight per individual row but changing it does nothing, same with BetSFitRow; All calculations are done, apparently correnctly but it is not stored and defaults to rowsize regardless ;

Unless I am mistaken, the only way to change an individual row is to react to the OnmeasuringRowItem, which implies that it is the app's responsability to keep individual row heights. Is this normal and the way it is intended ?

Didier

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 17 June 2010 - 09:51 PM

Hello Didier,

Is this question related to NextGrid or NextDBGrid?

In NextDBGrid only way is to use OnMeasuringRowHeight . You may add one field in table and then use it for reading different row heights.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.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 didiergm

didiergm
  • Honorable Members
  • 148 posts
  • Gender:Male
  • Location:France

Posted 17 June 2010 - 10:04 PM

QUOTE (Boki (Berg) @ Jun 17 2010, 10:51 PM) <{POST_SNAPBACK}>
Hello Didier,

Is this question related to NextGrid or NextDBGrid?

In NextDBGrid only way is to use OnMeasuringRowHeight . You may add one field in table and then use it for reading different row heights.

Best regards



Sorry Boki, NextDbGrid, wrong forum!;

I did a quick check and for a grid with
5 columns, 5 rows only one row being populated with data, this OnMeasuringRowHeight event is called 132 times, it is also called everytime the mouse hovers on top of a cell even if it stays on a cell so this event is called 1000's of times. going though the dataset that many times will be slow and will slow down your grid dramatically!

Any other thoughts ?

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 17 June 2010 - 10:37 PM

Hello Didier,

Unfortunately it must be called so many times because it calculate a cell's position.

Try to play with Demos\Next DBGrid\BDE\Demo 3 demo. I think that it have what you need.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.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 didiergm

didiergm
  • Honorable Members
  • 148 posts
  • Gender:Male
  • Location:France

Posted 18 June 2010 - 10:37 AM

QUOTE (Boki (Berg) @ Jun 17 2010, 11:37 PM) <{POST_SNAPBACK}>
Hello Didier,

Unfortunately it must be called so many times because it calculate a cell's position.

Try to play with Demos\Next DBGrid\BDE\Demo 3 demo. I think that it have what you need.

Best regards


you're right, there are a few hidden gems in the demos!

Regards

Didier

#6 didiergm

didiergm
  • Honorable Members
  • 148 posts
  • Gender:Male
  • Location:France

Posted 25 May 2011 - 04:45 PM

Boki,

I am trying to reimplement what you advised me to use a while back using the current dbgrid sources and it looks like the onChangeRowheight never gets called. I cannot actually run the demo because I do not have the bds installed.

am I doing solmething stupid ?





#7 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 25 May 2011 - 05:43 PM

Hi Didier,

Maybe you need to goRowResizing flag to set to True in Options property (?)

Boki
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.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