Jump to content


Photo

[NxGrid6] OnCellClick not called if row is not fully visible


  • Please log in to reply
5 replies to this topic

#1 bertrod

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

Posted 09 October 2021 - 11:47 AM

Hello,

 

I have the following problem with NxGrid6 version 6.6.0:

 

- In case a row of my grid is partially hidden (see the enclosed screenshot)

- I click on the 2nd row, this moves a little bit the scrollbar of the grid to display to row completely, which is a good thing

- But in the function TNxGridView6.DataMouseUp, the UpCell is different than FPressedCell (see 2nd screenshot). Therefore the OnCellClick event is not called.

 

This problem comes from the function GetCellAtPos, because of course the position of the cell has changed because the scrollbar of the grid has moved.

 

 

At the moment I force the UpCell := FPressedCell because my user cannot move the rows, so it is not a problem.

Do you have a better suggestion to solve this problem?

 

Thank you!

 

 

Attached Files



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 09 October 2021 - 12:10 PM

Hi,

 

It seems that screenshots are missing.


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 bertrod

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

Posted 10 October 2021 - 08:38 AM

Hi,

 

It seems that screenshots are missing.

 

I can see them at the bottom of my message, there is a part "Attached Thumbnails" with 2 images. You do not see them?



#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 10 October 2021 - 02:05 PM

Hi,

 

There are appeared now. Maybe I needed to reload page few times.

 

I will investigate the issue now.


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 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 16 October 2021 - 06:18 PM

Hi,

 

This seems like trickier than I thought. I'm not sure actually what is right way to do it, as cell is simply not anymore at same place after scroll and it will be maybe wrong to call it click.

 

I'm wondering if maybe new event OnCellMouseDown can work better for you?


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.

#6 bertrod

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

Posted 19 October 2021 - 08:43 AM

Hi,

 

This seems like trickier than I thought. I'm not sure actually what is right way to do it, as cell is simply not anymore at same place after scroll and it will be maybe wrong to call it click.

 

I'm wondering if maybe new event OnCellMouseDown can work better for you?

 

 

Hi,

 

The row is selected after the click and I think if a user is clicking on a row which is partially hidden, his goal is to select the row. So the OnClick should be called, but I understand it is not easy to solve. 

 

On my side it is OK because I have added the 'UpCell := FPressedCell' and it is working well for me, so you can take the time to think how you want to solve it.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users