Skip to main content
Answer

PXGridColumn: Wrapped lable destroys layout

  • November 9, 2021
  • 3 replies
  • 69 views

Forum|alt.badge.img

I have a graph with a form that has two columns with one field each.

One has hiphen in its DisplayName which causes the lable to be wrapped. As you can see the lables take different space, though the LableWith is set equally for both columns.

 

<px:PXSelector LabelWidth="70" Width="120" runat="server" ID="CstPXTextEdit19" DataField="ShipFrom" ></px:PXSelector>
<px:PXSelector LabelWidth="70" Width="120" runat="server" ID="CstPXTextEdit20" DataField="ShipTo" ></px:PXSelector>

 

What can I do to get a proper alignment?

Best answer by Naveen Boga

Hi @mhaps  Have you provided the PXLayoutRule (LablesWidth and Controlsize) for these controls on the .aspx page ?

 

 <px:PXLayoutRule runat="server" StartColumn="True" LabelsWidth="SM" ControlSize="XM"></px:PXLayoutRule>

<px:PXDropDown ID="edBudgetLevel" runat="server" DataField="BudgetLevel" CommitChanges="True"></px:PXDropDown>
<px:PXDropDown ID="edCostBudgetLevel" runat="server" DataField="CostBudgetLevel" CommitChanges="True"></px:PXDropDown>

 

3 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • Answer
  • November 9, 2021

Hi @mhaps  Have you provided the PXLayoutRule (LablesWidth and Controlsize) for these controls on the .aspx page ?

 

 <px:PXLayoutRule runat="server" StartColumn="True" LabelsWidth="SM" ControlSize="XM"></px:PXLayoutRule>

<px:PXDropDown ID="edBudgetLevel" runat="server" DataField="BudgetLevel" CommitChanges="True"></px:PXDropDown>
<px:PXDropDown ID="edCostBudgetLevel" runat="server" DataField="CostBudgetLevel" CommitChanges="True"></px:PXDropDown>

 


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • November 10, 2021

The two fields are in the same column and inside one PXLayoutRule.

ColumnWidth was set, but not LablesWidth or Controlsize. Setting LablesWidth of PXLayoutRule solved the problem.

Thanks @Naveen B !


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • November 10, 2021

Great :) Thanks for sharing an update @mhaps