0

I was trying to hide a tab that is unused. And I was doing everything that is explained by this thread Hiding a tab from the user interface dynamically.

Based on that thread, I use method 2 because there are more than 1 condition that affect the visibility of the TabItem. Here is the code that I write

MaterialDetail.Cache.AllowSelect = row.ItemNature == "TXL";
TextileDetail.Cache.AllowSelect = row.ItemNature == "GRM";
MaterialsSizings.Cache.AllowSelect = row.ItemNature == "TXL" && row.TextileItemType == "SIZ";
MaterialsWarpings.Cache.AllowSelect = row.ItemNature == "TXL" && row.TextileItemType == "WAR";
MaterialsWeavings.Cache.AllowSelect = row.ItemNature == "TXL" && row.TextileItemType == "WEA";

And I also ensure that the RepainOnDemand is set to false

<px:PXTabItem RepaintOnDemand="false" Text="Material Garment Details">

The problem that I found next is, the TabItem is still there, but there is nothing inside it. Like shown in this picture.

Empty TabItem

I was wandering if I missed something. Thank you in advance

EDIT

This is what is looks like when the grid is visible

TabItem

The data view for Material Garment Details is MaterialDetail. And the AllowSelect is in RowSelected event.

  • What is the content of your TabItem? For this method to work, it must contain a single grid element. – Hugues Beauséjour Nov 16 '17 at 15:04
  • Also, what is Material Garment Details DataView declaration? Where is the AllowSelect call? – Hugues Beauséjour Nov 16 '17 at 15:08
  • I already post the image and the answer to your question in edited post, thank you – Helmi Nandani Nov 17 '17 at 02:21
  • On the thread you link to, the AllowSelect calls needs to be located in the RowSelected event handler of the DataView DAC. In your question I'm not seeing the DataView declaration and RowSelected event handler which would help me confirm that step is ok. Maybe you have RowSelected on the wrong DAC. – Hugues Beauséjour Nov 17 '17 at 14:56
  • On the thread you link to, the PXTabItem must contain a single grid element in asp definition. In your question I'm not seeing the grid asp definition and can't confirm that this step is ok. Although judging from the image it does look alright. – Hugues Beauséjour Nov 17 '17 at 14:57

0 Answers0