Page 1 of 1

datagrid behaviour script with fields works unexpected

Posted: Tue Feb 21, 2017 3:25 pm
by UKMC
Hi altogether,

I have a datagrid form with 10 fields in each row

Depending on contents of each dataset, I want to show just some of the fields.
So I would have expected, that one of the following approaches in a repeat with i = 1 to n construct works

get "show field " & quote & "Nr"& i & quote & " of me"
do it

get "set the visible of field "& quote &"Nr"& i & quote & " of me to true"

do it

But it doesn't :-(

It works with images, it works with graphics, but it does not work with fields...
As I have graphics and fields in overlay, I estimated that perhaps layers do not work correctly in datagrid - so I made all graphics non-opaque - no result

I hope there is one out there who can give me the right hint.
Thanks in advance

Best regards


Ulrich

Re: datagrid behaviour script with fields works unexpected

Posted: Tue Feb 21, 2017 4:01 pm
by Klaus
Hi Ulrich,

no need to DO things here:
...
show fld ("Nr" & i) of me
...
will do (sic! :D ).

For eventual layering issues, you set up the template group for your FORM,
so it is up to you to avoid these kind of problems.
Or do you have some more "layout" code in your handlers?

Please post your complete code of your "row template".


Best

Klaus

Re: datagrid behaviour script with fields works unexpected

Posted: Wed Feb 22, 2017 12:41 pm
by UKMC
Hi Klaus,

thanks for your answer.

While writing my next post to this thread and preparing an example for you I found the solution.

The problem was not, that the fields were not shown, they were.
But the standard text they contain in the row template was deleted while incarnation of the rows
So I had just to set again the correct value.

Now everything work perfect.

Thanks for your post, it got me to the right thought !!

Best regards


Ulrich