Page 1 of 1

dgHilitedLines of Datagrid is empty

Posted: Mon Aug 12, 2019 1:37 pm
by synto
Hi all,

I'm trying, in the same card, to display a datagrid, and when the user select a line, a simple form is display with a "Ok" button. This button update another card and switch to it.

Here is my mouseUp handler in the Behavior Script of the datagrid, and it's working

Code: Select all

on mouseUp pMouseBtnNum
   local theDataA

   put the dgDataOfLine[the dgLine of me] of the dgControl of me into theDataA
   put theDataA["aliment"] into field labelalimentselected
   put empty into field "vnb"
   hide group "tablo"
   show group "groupQuantite" with visual effect scroll down
   
   pass mouseUp
end mouseUp

Problem is in the Ok button script of the groupQuantite: the dgHilitedLines of my datagrid is empty, and i'm unable to retrieve the data stored in the row selected by user

Code: Select all

put the dgHilitedLines of group "tablo" into theLine
put the dgDataOfLine[theLine] of group "tablo" into theDataA
Any idea what is wrong ?

Re: dgHilitedLines of Datagrid is empty

Posted: Mon Aug 12, 2019 2:28 pm
by Klaus
Hi synto,

sorry, do not understand your workflow...

When does the line get hilited that is missing in your "OK" button?
How does that property "disappear" (line gets unhilited)?
Can't you set a global variable or custom property and store that number for later use?
Know what i mean?


Best

Klaus

Re: dgHilitedLines of Datagrid is empty

Posted: Mon Aug 12, 2019 3:12 pm
by synto
1 - Card1, user select a line on the Tablo datagrid
2 - Show the groupQuantite form with Ok button
3 - Click on Ok button
4 - Update Card2 with info of hilited line of Tablo datagrid
5 - Switch to Card2

Yes it's working with a global variable but i'm just trying to avoid the use of global
And don't understand why this dgHilitedLines property become empty between step 2 and 3

Thanks for your reply Klaus