Nov 15, 2019, 3:16 PM
Using .Store() in .GridPanel() to show a panel below the grid
I am trying to get a .Panel() element to display just below my .GridPanel() element, all on the same tab. Here is my current code:
Html.X().TabPanel()
.TabPosition(TabPosition.Left)
.TabRotation(0)
.Width(1500)
.Height(800)
.MarginSpec("10 10 -10 10")
.Items(
Html.X().GridPanel()
.Title("Request Priorities")
.ID("reqPrioritiesGrid")
.ColumnWidth(1)
.MarginSpec("0 0 0 0")
.Width(1000)
.Height(400)
.Border(true)
.Store(
Html.X().Store()
.ID("reqPrioritiesStore")
.AutoLoad(true)
.DataSource(Model.RequestPriorities)
.Model(
Html.X().Model()
.Fields(f =>
{
f.Add(Html.X().ModelField().Name("RequestPriorityName").Type(ModelFieldType.String));
f.Add(Html.X().ModelField().Name("RequestPriorityDescription").Type(ModelFieldType.String));
f.Add(Html.X().ModelField().Name("SortOrder").Type(ModelFieldType.Int));
f.Add(Html.X().ModelField().Name("ResponseTarget").Type(ModelFieldType.String));
f.Add(Html.X().ModelField().Name("ResponseFormat").Type(ModelFieldType.String));
f.Add(Html.X().ModelField().Name("ResponseSLA").Type(ModelFieldType.String));
})
)
.ServerProxy(
Html.X().AjaxProxy()
.Url(Url.Action("ManageLists", "Admin", new { area = "Cadence" }))
)
)
.Listeners(l =>
{
l.Select.Handler = "handleReqPopulate(record.data);" + "toggleEditRequest();";
})
.ColumnModel(
Html.X().Column().Flex(1).Text("Request Priority Name").DataIndex("RequestPriorityName"),
Html.X().Column().Flex(3).Text("Request Priority Desciption").DataIndex("RequestPriorityDescription"),
Html.X().Column().Flex(1).Text("Sort Order").DataIndex("SortOrder"),
Html.X().Column().Flex(1).Text("Response Target").DataIndex("ResponseTarget"),
Html.X().Column().Flex(1).Text("Response Format").DataIndex("ResponseFormat"),
Html.X().Column().Flex(1).Text("Response SLA").DataIndex("ResponseSLA")
),
Html.X().Panel()
.Title("Task Priorities")
.ID("taskPrioritiesGrid"),
Html.X().Panel()
.Title("Task Severities"),
Html.X().Panel()
.Title("Request Groups"),
Html.X().Panel()
.Title("Request Group Types")
)
I have tried adding the .Panel() element inside the .Store() scope, but I get an overload error message when I try to do that. Adding it outside of the .Store() creates a new tab. Is there a way to display the panel just below the grid while being on the same tab?