Jump to content


Photo

visible for a row


  • Please log in to reply
2 replies to this topic

#1 aboisrame

aboisrame
  • Members
  • 17 posts

Posted 10 April 2020 - 03:52 PM

Hello,

 

 is there a reason sometimes a exception is thrown (column -1 out of bounds) when you do

 

grid.row[i].visible := "a boolean";

 

on a row which exists for a grid with columns ? 

 

In my code, I write now :

 

try

   grid.row[i].visible := "a boolean";

except

end;

 

but I would like to understand what I don't understand :)

Thank you

Alexandre Boisramé



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 10 April 2020 - 06:24 PM

Hi,

 

This code should work fine, always. Do you use some other code beside this simple one? This error can only happen if a row is not existing (for example i > NextGrid.RowCount)

 

Maybe I can get some insight after seeing your code in a context.


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 aboisrame

aboisrame
  • Members
  • 17 posts

Posted 10 April 2020 - 07:52 PM

My code is too complicated :)

 

I use code to draw myself some cells with onEventXXXX 

 

What I did this afternoon to "solve" the problem is to change all ".visible" change after all the grid is populated and after ".endUpdate"

 

And it works. 

Thank you

Alexandre Boisramé

 

 

 

Hi,

 

This code should work fine, always. Do you use some other code beside this simple one? This error can only happen if a row is not existing (for example i > NextGrid.RowCount)

 

Maybe I can get some insight after seeing your code in a context.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users