I have a problem with aligning tab items among with other item in group2.
C#@Html.DevExpress().FormLayout(s =>
{
s.Name = "settings1";
s.Width = Unit.Percentage(100);
s.AlignItemCaptionsInAllGroups = true;
s.Items.AddGroupItem(ng =>
{
ng.Name = "group1";
ng.Caption = "Group 1";
ng.Items.Add(i =>
{
i.Name = "item1";
i.CaptionSettings.Location = LayoutItemCaptionLocation.Top;
i.RequiredMarkDisplayMode = FieldRequiredMarkMode.Hidden;
i.Caption = "Item 1";
i.NestedExtensionType = FormLayoutNestedExtensionItemType.TrackBar;
var tbSettings = (TrackBarSettings)i.NestedExtensionSettings;
tbSettings.Width = Unit.Percentage(50);
tbSettings.Properties.MaxValue = 5;
tbSettings.Properties.MinValue = 0;
tbSettings.Properties.ScalePosition = ScalePosition.RightOrBottom;
tbSettings.Properties.ValueToolTipPosition = ValueToolTipPosition.RightOrBottom;
tbSettings.Properties.LargeTickInterval = 5;
tbSettings.Properties.ValueType = typeof(int);
});
});
s.Items.AddGroupItem(g =>
{
g.Name = "group2";
g.Caption = "Group 2";
g.Width = Unit.Percentage(100);
g.AlignItemCaptions = true;
g.Items.Add(i =>
{
i.Name = "item2";
i.Caption = "Item 2";
i.NestedExtensionType = FormLayoutNestedExtensionItemType.ComboBox;
var cbSettings = (ComboBoxSettings)i.NestedExtensionSettings;
cbSettings.Properties.Items.Add("Option 1");
cbSettings.Properties.Items.Add("Option 2");
cbSettings.Properties.Items.Add("Option 3");
cbSettings.Properties.Items.Add("Option 4");
cbSettings.Properties.ClientSideEvents.SelectedIndexChanged = "OnSelectedIndexChanged";
});
g.Items.AddTabbedGroupItem(tg =>
{
tg.Name = "tabGroup1";
tg.Width = Unit.Percentage(100);
tg.ShowGroupDecoration = false;
tg.Items.AddEmptyItem();
tg.Items.Add(i =>
{
i.Name = "item3";
i.ShowCaption = DefaultBoolean.True;
i.Caption = "Long Text";
i.NestedExtensionType = FormLayoutNestedExtensionItemType.ComboBox;
var cbSettings = (ComboBoxSettings)i.NestedExtensionSettings;
cbSettings.Properties.ValueType = typeof(int);
cbSettings.Properties.ValueField = "Id";
cbSettings.Properties.TextField = "Country";
});
tg.Items.Add(i =>
{
i.Name = "item4";
i.Caption = "Super Long Text";
i.NestedExtensionType = FormLayoutNestedExtensionItemType.ComboBox;
i.ShowCaption = DefaultBoolean.True;
var cbSettings = (ComboBoxSettings)i.NestedExtensionSettings;
cbSettings.Properties.ValueType = typeof(int);
cbSettings.Properties.ValueField = "Id";
cbSettings.Properties.TextField = "Name";
});
tg.Items.Add(i =>
{
i.Name = "item5";
i.Caption = "Very Very Very Long Text";
i.NestedExtensionType = FormLayoutNestedExtensionItemType.ComboBox;
i.ShowCaption = DefaultBoolean.True;
var cbSettings = (ComboBoxSettings)i.NestedExtensionSettings;
cbSettings.Properties.ValueType = typeof(int);
cbSettings.Properties.ValueField = "Id";
cbSettings.Properties.TextField = "Title";
});
});
});
s.Items.Add(i =>
{
i.Name = "submitButton";
i.ShowCaption = DefaultBoolean.False;
i.HorizontalAlign = FormLayoutHorizontalAlign.Center;
i.NestedExtensionType = FormLayoutNestedExtensionItemType.Button;
var btnSettings = (ButtonSettings)i.NestedExtensionSettings;
btnSettings.UseSubmitBehavior = true;
btnSettings.Width = Unit.Pixel(100);
btnSettings.Text = "Go";
});
}).GetHtml()
I thought that with AlignItemCaptionsInAllGroups property enabled it should fix by itself.
Hi,
Thank you for pointing out this behavior. I was able to reproduce it on our side. I will discuss it with the team and we will contact you once we have any results. We greatly appreciate your time and cooperation.