PDA

View Full Version : [CLOSED] Render issue in a grouped grid panel with CommandColumn



ATLAS
Jul 24, 2013, 8:18 AM
Hi,
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('UserCom pElementsGrouping').expandAll();"),

Html.X().Button()
.Icon(Icon.BulletMinus)
.Text(GlobalResources.CollapseAll)
.Handler("this.up('gridpanel').getView().getFeature('UserCom pElementsGrouping').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.PerformanceKnowledgeCriteria Assessment)
.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.TooltipSelectToAssociateI temWithEvidence)
.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 :-


6606

If I expand the second group, I again get correct reslts :-

6608

If I expand the first group, I get incorrect rendering :-

6609

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.

Daniil
Jul 24, 2013, 11:40 AM
Hi @ATLAS,

Please clarify do you use the latest Ext.NET sources from the SVN trunk or something else?

ATLAS
Jul 24, 2013, 4:19 PM
Hi @ATLAS,

Please clarify do you use the latest Ext.NET sources from the SVN trunk or something else?

I'm using SVN from a couple of days ago. I'll try latest release as I see there is one available.

ATLAS
Jul 24, 2013, 4:38 PM
I'm using SVN from a couple of days ago. I'll try latest release as I see there is one available.

Hi Daniil, I'm afraid I get the same results with the latest from SVN.

Vladimir
Jul 24, 2013, 5:25 PM
Your sample is not runable, please provide runable test case