-
[CLOSED] Layout Config
I am using MVC/Razor. I am using a Radio group with a custom config:
Code:
Html.X.RadioGroup() _
.AllowBlank(False) _
.AutoFitErrors(False) _
.MsgTarget(MessageTarget.Side) _
.FieldLabel("Template") _
.Layout(LayoutType.Column) _
.Items(
Html.X.Container() _
.ID("radioCol1") _
.ColumnWidth(1) _
.Items(
Html.X.Component().Html("To Client").Cls("x-form-check-group-label"),
Html.X.Radio().ID("rdoClientFirst").BoxLabel("Client First or Simultaneously").BoxLabelStyle("font-weight:normal !important").BoxLabelAlign(BoxLabelAlign.After),
Html.X.Radio().ID("rdoFullyExecuted").BoxLabel("Fully Executed"),
Html.X.Component().Html("To RI").Cls("x-form-check-group-label"),
Html.X.Radio().ID("rdoRIFirst").BoxLabel("First or Simultaneously"),
Html.X.Radio().ID("rdoRISecond").BoxLabel("Second"),
Html.X.Radio().ID("rdoClientSignature").BoxLabel("Client Signature")
)
))
I have been trying to find the "pack" feature of the layout configuration so that I can get the radio group items to pack to the top, but I can't seem to find it. Is that still available in 2.0? If not, is there an equivalent?
-
Hi @adelaney,
There was no "pack" feature for Column layout. It is available for HBoxLayout and VBoxLayout.
Though I am not 100% sure what you mean.
If you would provide a mockup of the required layout, we could suggest something.
-
How do you use layoutconfig in MVC for VBox?
-
Hi @KBorkiewicz,
Do you mean Razor? Here it is.
Example
Code:
<!DOCTYPE html>
<html>
<head>
<title>Ext.Net.MVC v2 Example</title>
</head>
<body>
@Html.X().ResourceManager()
@(Html.X().Container()
.Height(200)
.Width(200)
.LayoutConfig(
new VBoxLayoutConfig()
{
Align = VBoxAlign.Stretch
}
)
.Items(
Html.X().Container().Flex(1).StyleSpec("background-color: green;"),
Html.X().Container().Flex(1).StyleSpec("background-color: yellow;")
)
)
</body>
</html>
-
That is what I meant, thank you. However I get these errors when I try to do that:
Code:
"The best overloaded method match for 'Ext.Net.AbstractContainer.Builder<Ext.Net.Container,Ext.Net.Container.Builder>.LayoutConfig(System.Action<Ext.Net.LayoutConfigCollection>)' has some invalid arguments"
"Argument 1: cannot convert from 'Ext.Net.VBoxLayoutConfig' to 'System.Action<Ext.Net.LayoutConfigCollection>'"
-
What is the Ext.NET version you are trying with?
-
-
-