[CLOSED] HideLabel doesn't work as expected

  1. #1

    [CLOSED] HideLabel doesn't work as expected

    If one (not all) field has HideLabel=true then it will not stretch the field to fit the entire width. But if both (all) fields has HideLabel, then all fields are stretched. In earlier versions it was possible to hide single fieldlabels and have those fields streched.


    Html.X().Panel()
    .Layout(LayoutType.Form)
    .Items(
    Html.X().TextField()
    .FieldLabel("Field1")
    .HideLabel(true)
    ,
    Html.X().TextField()
    .FieldLabel("Field2")
    .HideLabel(false)

    )

    Also .LabelWidth doesn't work here.
    Last edited by fabricio.murta; Mar 29, 2016 at 2:03 PM.
  2. #2
    A workaround is to use a FormPanel and set ContainerField's AnchorHorizontal to 100%, but that creates other limitations.
    Last edited by sveins12; Mar 29, 2016 at 12:26 AM.
  3. #3
    Hello @sveins12!

    About the formLayout, it reserves the label space for all fields if just one field has label, this is the expected behavior.

    As you have done, is likely the best solution. The form layout works if you want to easily draw a plain form. As you need to do custom formatting and layout on the form, you are better off using the other layout options.

    I hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] FieldContainer hideLabel
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 06, 2014, 12:06 PM
  2. Doesn't work via SSLVPN
    By inorder in forum 1.x Help
    Replies: 10
    Last Post: Jun 06, 2012, 7:42 AM
  3. Northwind example doesn't work in IE9
    By Const in forum 1.x Help
    Replies: 10
    Last Post: Dec 09, 2011, 3:04 AM
  4. Replies: 1
    Last Post: Jan 12, 2011, 9:13 PM
  5. Replies: 2
    Last Post: Mar 05, 2010, 1:27 AM

Posting Permissions