Welcome! Log In Create A New Profile

Advanced

How to find Row/Column (Cell) in browsed table

Posted by rdj 
rdj
How to find Row/Column (Cell) in browsed table
August 29, 2023 11:38AM
How can I color the background in a cell when using a browsed source in a table (Array)


In the documentation I have found that to color a specific cell I need to use
<Column control>[<Row>][<Column>].BackgroundColor = <Color value>




In the code:
Open a screen with an array as parameter.


Table content is filled with this array

In Table code


In Display a row in Table_XXX

IF COL_RG1=True THEN
COL_RG2[?][?].BackgroundColor = PastelGreen
ELSE
COL_RG2[?][?].BackgroundColor = PastelRed
END

IF COL_Rh1=True THEN
COL_Rh2[?][?].BackgroundColor = PastelGreen
ELSE
COL_Rh2[?][?].BackgroundColor = PastelRed
END

How can I find the correct row and column while using a browsed source (array) because select is not working (I am not actively selecting)

kind regards,

RdJ
Windev 2024/Webdev 2024
Al
Re: How to find Row/Column (Cell) in browsed table
August 29, 2023 01:22PM
Hello RdJ

The only thing you need to know is the column number. You can use the table name as the selection criteria

//if column named "COL_RG2" is column 5 in the table then

Table_XXX [Table_XXX ][5]..BackgroundColor = PastelGreen

Regards
Al
rdj
Re: How to find Row/Column (Cell) in browsed table
August 29, 2023 02:49PM
Thanks Al, worked like a charm

used TableColumnIndex(TABLE_XXX,"COL_RG2",tcpDisplay) for my Column number to I don't miscount

kind regards,

RdJ
Windev 2024/Webdev 2024
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: