Forum Discussion

Maddy's avatar
Maddy
Ideator I
4 years ago

How to hide/show columns of relationship on OnFormPopulate event

Hi All,

I am trying to hide some of the columns from the relationship based on parent property value, I have tried below code:

parent.findCurrentRelationshipsTab().grid.setColumnVisible(ColumnIndex, false, 150);

however, this is working when Item is loaded, I want this on onFormPopulate.

I am getting the parent.findCurrentRelationshipsTab().grid as null/empty.

Is there any way to get the relationship grid.

Thanks,

Maddy

3 Replies

  • however, this is working when Item is loaded, I want this on onFormPopulate.

  • Hi

    Attach your method on change of dropdown box property event.  

    please find the below code to hide/show the relationship tab

    //based on your condition (dropdown box value)  set 0 or 1 in below code

    //0-means hide the relationship

    //1- means show the relationship.

    parent.relationships.relTabbar.setTabVisible(top.aras.getRelationshipTypeId("your_relationship_name"),

  • I guess the grid is not loaded fully when the form is populating. Check whether all the tabs are loaded and then hide the columns.