Is it possible to change Visible property in pages?

apankoapanko Member Posts: 70
edited 2009-01-13 in NAV Three Tier
Hello.

I've created the page Customer List (No, Descr, Address).
I want to hide/show the "Address" column dynamically.

I've created global variable bVisible (type=bool, IncludeInDataset=Yes)
and set the value of property "Visible" to bVisible (this is property of element Address).

When page is opening - everything is correct (If I put "bVisible:=true;" in the trigger OnOpenPage() then column is visible, if I put nothing there, "Address" is invisible).

But if I change value of bVisible (with actions or just click checkbox) notihng happens.

When I tried to use CurrPage.Address.Visible(bVisible), I got error: The VISIBLE() method is obsolete.

Have I missed something or it is impossible?

Comments

  • munib00munib00 Member Posts: 29
    From what I read (cant remember where). I dont think this is possible with role tailored client. I dont think you can use visible.
    Hope someone can prove me wrong.
  • clauslclausl Member Posts: 455
    In RoleTailored client, the visibility property is supported on Groups and Parts. For controls only the OnInit and OnOpen triggers are supported.

    Regards,
    Claus
    Claus Lundstrøm | MVP | Senior Product Manager | Continia.com
    I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
    I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)
  • apankoapanko Member Posts: 70
    Thank you, Claus.
  • apankoapanko Member Posts: 70
    clausl wrote:
    In RoleTailored client, the visibility property is supported on Groups and Parts. For controls only the OnInit and OnOpen triggers are supported.

    Page 9231 Items by Location Matrix
    Why function SetVisible() is triggered for every record (onAfterGetRecord) if the visiblity property for controls is supported only for OnInit and for OnOpenPage triggers?
    IMHO SetVisible should be in the OnOpenPage trigger.

    This way we can avoid superfluous calls. And this one call will be effective.

    The same is true for the form 9231. It works correct, but I'm not sure that function SetVisible should be called for every record. The number of columns is same for all records, so it is possible to set the visiblity property once - at the onOpenForm trigger.

    Andrey
Sign In or Register to comment.