Click or drag to resize

HTMLPanelToggleGroup Method

Gives HTML code for a panel group/list with panels (toggel panel) formatted by Bootstrap

Namespace:  SOWIWeb.Helper
Assembly:  SOWIWeb.Helper (in SOWIWeb.Helper.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax
public static string PanelToggleGroup(
	List<Panel> pPanels,
	string pPanelGroupName,
	bool pMultiselectable = true,
	string pStylePanelGroup = "panel-group"
)

Parameters

pPanels
Type: System.Collections.GenericListPanel
list of type Panel
pPanelGroupName
Type: SystemString
panel group/list name
pMultiselectable (Optional)
Type: SystemBoolean
not supported
pStylePanelGroup (Optional)
Type: SystemString
default see StylePanelGroup

Return Value

Type: String

[Missing <returns> documentation for "M:SOWIWeb.Helper.HTML.PanelToggleGroup(System.Collections.Generic.List{SOWIWeb.Helper.Panel},System.String,System.Boolean,System.String)"]

Remarks
This code in cshtml code file
@{
    var lPanels = new List<SOWIWeb.Helper.Panel>();
    lPanels.Add(new SOWIWeb.Helper.Panel("PanelObjekt", "Objekt", Html.Partial("_ObjektContentObjekt").ToString(), true));
    lPanels.Add(new SOWIWeb.Helper.Panel("PanelAnlagekennlinie", "Anlagekennlinie", Html.Partial("_ObjektContentAnlagekennlinie").ToString(), false));
}

<div>
    @Html.Raw(SOWIWeb.Helper.HTML.PanelToggleGroup(lPanels, "easyPlanObjekt"))
</div>
create this HTML code (Partial isn't HTML code because it's easier to read)
<div>
    <div class="panel-group" id="easyPlanObjekt" role="tablist" aria-multiselectable="true">
        <div class="panel panel-default">
            <div class="panel-heading" role="tab" id="PanelObjektHeadingID">
                <h4 class="panel-title">
                    <a role="button" data-toggle="collapse" data-parent="#easyPlanObjekt" href="#PanelObjekt" aria-expanded="true" aria-controls="PanelObjekt">
                        Objekt
                    </a>
                </h4>
            </div>
            <div id="PanelObjekt" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="PanelObjektHeadingID">
                <div class="panel-body">
                    @Html.Partial("_ObjektContentObjekt")
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading" role="tab" id="PanelAnlagekennlinieHeadingID">
                <h4 class="panel-title">
                    <a class="collapsed" role="button" data-toggle="collapse" data-parent="#easyPlanObjekt" href="#PanelAnlagekennlinie" aria-expanded="false" aria-controls="PanelAnlagekennlinie">
                        Anlagekennlinie
                    </a>
                </h4>
            </div>
            <div id="PanelAnlagekennlinie" class="panel-collapse collapse" role="tabpanel" aria-labelledby="PanelAnlagekennlinieHeadingID">
                <div class="panel-body">
                    @Html.Partial("_ObjektContentAnlagekennlinie")
                </div>
            </div>
        </div>
    </div>
</div>
Examples
Example in cshtml code file
@{
  var lPanels = new List<SOWIWeb.Helper.Panel>();
  lPanels.Add(new SOWIWeb.Helper.Panel("Test1", "Test 1", "Test 1 text", false));
  lPanels.Add(new SOWIWeb.Helper.Panel("Test2", "Test 2", "Test 2 text", true));
  lPanels.Add(new SOWIWeb.Helper.Panel("Test3", "Test 3", "Test 3 text", false));
}

@Html.Raw(SOWIWeb.Helper.HTML.PanelToggleGroup(lPanels, "TestGroup1"))
See Also