Group control elements in serenity dialog/form #5395
-
Hi Team, my screen dialog output appears like this : I want the UI to group the elements and appear like below : |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @vmrosariojoe try something like this on your form.cs [HalfWidth]
public String PatientReferenceNo{ get; set; }
[HalfWidth]
public String PatientFullName{ get; set; }
[HalfWidth]
[FormCssClass("line-break-sm")]
public DateTimePatientDateOfBirth{ get; set; }
[HalfWidth]
[FormCssClass("line-break-sm")]
public int Age{ get; set; }
[HalfWidth]
[FormCssClass("line-break-sm")]
public String PatientPatientImage{ get; set; } Put [HalfWidth] on all fields, but just put Read more here |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi @vmrosariojoe, to custom dialog layout, you can add a html template file with name same with your dialog, for example, your dialog has name CategoryDialog.Template.html <div class="s-DialogContent">
<div id="~_Toolbar" class="s-DialogToolbar">
</div>
<div class="s-Form">
<form id="~_Form" action="">
<div class="fieldset" style="display: block">
<div id="~_PropertyGrid" class="col-md-6"></div>
<div id="~_rightPanelContainer" class="col-md-6"></div>
<div class="clear"></div>
</div>
</form>
</div>
</div> The template above add a div on right, we will use it to hold Image field Edit your dialog.ts and move your Image field to new container constructor() {
super();
this.byId("rightPanelContainer").append(this.form.Picture.getGridField());
} Nothing change on your Form.cs, but your field should be [FullWidth] instead [HaftWidth] like before, because right now they just take 50% of dialog !!! Keep in mind that this is hack and it maybe a bug in future, so DO IT AT YOUR OWN RISK |
Beta Was this translation helpful? Give feedback.
Hi @vmrosariojoe, to custom dialog layout, you can add a html template file with name same with your dialog, for example, your dialog has name
AbcDialog.ts
then create html template with nameAbcDialog.Template.html
CategoryDialog.Template.html
The temp…