Jul 24, 2013, 8:18 AM
[CLOSED] Render issue in a grouped grid panel with CommandColumn
Hi,
I have a rendering issue based on the following GridPanel code :-
If I expand the second group, I again get correct reslts :-
If I expand the first group, I get incorrect rendering :-
Notice the group header bar for the first group is incorrect. If I comment out the CommandColumn section in the source code, this does not happen.
I have a rendering issue based on the following GridPanel code :-
@(Html.X().GridPanel()
.ID("PERFORMANCE_CRITERIA_GRID_PANEL_ID")
.Region(Region.West)
.Layout(LayoutType.HBox)
.LayoutConfig(new HBoxLayoutConfig { Align = HBoxAlign.Stretch })
.Split(false)
.AutoScroll(true)
.Border(true)
.Flex(3)
.Width(1000)
.MaxHeight(750)
.Padding(2)
.Cls("custom-grid")
.ColumnLines(true)
.TopBar(
Html.X().Toolbar()
.Flat(true)
.Items(
Html.X().ToolbarFill(),
Html.X().Button()
.Icon(Icon.BulletPlus)
.Text(GlobalResources.ExpandAll)
.Handler("this.up('gridpanel').getView().getFeature('UserCompElementsGrouping').expandAll();"),
Html.X().Button()
.Icon(Icon.BulletMinus)
.Text(GlobalResources.CollapseAll)
.Handler("this.up('gridpanel').getView().getFeature('UserCompElementsGrouping').collapseAll();"),
Html.X().ToolbarSpacer().Width(30)
)
) /* -- end of top bar items -- */
.StoreID("SUBMIT_EVIDENCE_STORE_ID")
.ColumnModel(
Html.X().Column()
.ID("CU-ID")
.Hidden(true)
.DataIndex("CUId"),
Html.X().Column()
.ID("CE-ID")
.Hidden(true)
.DataIndex("CEId"),
Html.X().Column()
.ID("PerfCrit-ID")
.Hidden(true)
.DataIndex("PerfCritId"),
Html.X().SummaryColumn()
.Text(GlobalResources.CompetencyUnits)
.DataIndex("CUDescription")
.Hideable(false),
Html.X().Column()
.Text(GlobalResources.Unit)
.Width(100)
.Sortable(false)
.MenuDisabled(true)
.DataIndex("CUTitle"),
Html.X().SummaryColumn()
.Text(GlobalResources.Element)
.Width(100)
.Sortable(false)
.MenuDisabled(true)
.DataIndex("CEDescription"),
Html.X().SummaryColumn()
.Text(GlobalResources.PerformanceKnowledgeCriteriaAssessment)
.DataIndex("PerfCriteria")
.Sortable(false)
.MenuDisabled(true)
.Flex(1),
/*
Html.X().CheckColumn()
.Text(GlobalResources.Select)
.DataIndex("IsSelected")
.Editable(true)
.MenuDisabled(true)
.Renderer(new Renderer() { Fn = "fnRenderElementSelectedCheckbox" })
.Sortable(false)
.Width(60)
.ToolTip(GlobalResources.TooltipSelectToAssociateItemWithEvidence)
.Align(Alignment.Center)
.Listeners(l =>
{
l.CheckChange.Fn = "fnCheckboxChange";
l.AfterRender.Fn = "fnPostRenderElementSelectedCheckbox";
}),
*/
Html.X().CommandColumn()
.Hidden(true)
.GroupCommands(
Html.X().CommandFill(),
Html.X().GridCommand()
.Icon(Icon.TableRowInsert)
.CommandName("SelectGroup")
.ToolTip(tt =>
{
tt.Title = "Element Select";
tt.Text = "Select all Elements of this Competency Unit";
}),
Html.X().GridCommand()
.Icon(Icon.TableRowDelete)
.CommandName("DeselectGroup")
.ToolTip(tt =>
{
tt.Title = "Element Deselect";
tt.Text = "Deselect all Elements of this Competency Unit";
})
)
.PrepareGroupToolbar("prepareGroupToolbar")
.Listeners(ls =>
ls.GroupCommand.Fn = "onGroupCommand"
)
)
.SelectionModel(
Html.X().CheckboxSelectionModel()
.Mode(SelectionMode.Multi )
.Listeners(l =>
{
// l.Select.Fn = "fnCheckboxChange";
// l..Fn = "fnPostRenderElementSelectedCheckbox";
})
)
.View(Html.X().GridView()
.Plugins(Html.X()
.GridDragDrop()
.EnableDrop(false)
.DDGroup("gridDDGroup")
)
.StripeRows(true)
.TrackOver(true)
)
.Features(
Html.X().Grouping()
.ID("UserCompElementsGrouping")
.GroupHeaderTplString("{name} ({rows.length} Element{[values.rows.length > 1 ? 's' : '']})")
.HideGroupedHeader(true)
.EnableGroupingMenu(false)
.StartCollapsed(true),
Html.X().RowWrap()
)
.BottomBar(bar => bar.Add(Html.X().PagingToolbar()
.Flat(true)
.DisplayInfo(true)
.DisplayMsg(GlobalResources.ToolbarDisplayElements)
)
)
)
After page load, the grid looks like this, which is correct :-If I expand the second group, I again get correct reslts :-
If I expand the first group, I get incorrect rendering :-
Notice the group header bar for the first group is incorrect. If I comment out the CommandColumn section in the source code, this does not happen.
Last edited by Daniil; Jul 30, 2013 at 4:10 AM.
Reason: [CLOSED]