Page 2 of 2

Re: check box selection in data grid and on a separate card

Posted: Fri Feb 28, 2014 7:21 am
by Simon
Yes! It is wrong.
What would be the itemDel?

Re: check box selection in data grid and on a separate card

Posted: Fri Feb 28, 2014 7:23 am
by keram
itemDel would be tab

Re: check box selection in data grid and on a separate card

Posted: Fri Feb 28, 2014 7:26 am
by keram
So you mean in order for it to work properly I have to remove leading 0 from the gMySelectedLineNrs ?

Re: check box selection in data grid and on a separate card

Posted: Fri Feb 28, 2014 7:29 am
by Simon
2 = 002 --Yes
2 is among the items of 002 003 004 --No
002 is among the items of 002 003 004 --Yes

Think about that for a bit.
So you mean in order for it to work properly I have to remove leading 0 from the gMySelectedLineNrs ?
No, but you cannot use "is among the items of"
Think up a repeat loop were you can use "="

Re: check box selection in data grid and on a separate card

Posted: Fri Feb 28, 2014 7:33 am
by keram
Thanks Simon, :)

I'll look at it later today and come back if necessary,

keram

Re: check box selection in data grid and on a separate card

Posted: Fri Feb 28, 2014 11:03 am
by keram
Hi Simon,
Simon wrote:Think up a repeat loop were you can use "="
Something like this?

Code: Select all

   repeat for each item i in gMySelectedLineNrs
      if gCurentIndex =  i then
         set the hilite of btn "Check" to "true"
      else
         set the hilite of btn "Check" to "false"
      end if
   end repeat
----------------------

I tried another solution:
Removed the leading 0 from the main data table from which all the other variables in the stack derive their values. It's simpler and quicker and in this way I will avoid possible problems with items.

Now the checkboxes in the "All Lines" and "My Selection"view get proper hilites when the checkbox on the "oneline" card is toggled.
To get it working the other way I had to add this to the cd "oneline":

Code: Select all

   put empty into gMySelectedLineNrs
   repeat for each line i in gMySelection
      if item 2 of i is "true" then
         put item 1 of i & tab after gMySelectedLineNrs 
      end if
   end repeat
----------------------

Now I will be more alert on items...

Thanks again for all your help :)

keram