Jump to content


Photo

TNextGrid cell selection problem


  • Please log in to reply
1 reply to this topic

#1 pzi

pzi
  • Members
  • 1 posts

Posted 04 August 2014 - 10:24 PM

Hi,

I have to use a TNextGrid component in my application (version 5.9.20). The grid is quite narrow (36 pixels width, only 1 col) with no scrollsbars (see picture attached).

Every cell can be selected, everything is ok. But once I use the SelectAll procedure, I'm not able to select individually the last row anymore. The others rows can be selected, but clicking the last row doesn't even fire the onselectCell event. If the grid is larger (like 85 pixels), no problem at all!

I've investigated the problem and it seems that the component thinks I click on the horizontal scrollbar although it isn't drawn! Like an invisible layer.

I was able to correct the problem by adding UpdateHorzScrollBar in TNxCustomGridControl.EndUpdate.

procedure TNxCustomGridControl.EndUpdate;
if FUpdateCount > 0 then Dec(FUpdateCount);
if (FUpdateCount = 0) and CanUpdate then
begin
Invalidate;
UpdateVertScrollBar;
UpdateHorzScrollBar;
end;
end;

Cheers,

PZI

Attached Files



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 05 August 2014 - 12:31 AM

Hi,

I will add your fix into my official code. It will be included from tomorrow.
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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users