[CLOSED] Render issue in a grouped grid panel with CommandColumn

  1. #1

    [CLOSED] Render issue in a grouped grid panel with CommandColumn

    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('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 :-


    Click image for larger version. 

Name:	Upload Evidence Grid 1.png 
Views:	19 
Size:	18.0 KB 
ID:	6606

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

    Click image for larger version. 

Name:	Upload Evidence Grid 2.png 
Views:	24 
Size:	43.8 KB 
ID:	6608

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

    Click image for larger version. 

Name:	Upload Evidence Grid 3.png 
Views:	21 
Size:	53.3 KB 
ID:	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.
    Last edited by Daniil; Jul 30, 2013 at 4:10 AM. Reason: [CLOSED]
  2. #2
    Hi @ATLAS,

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

    Two days ago

    Quote Originally Posted by Daniil View Post
    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.
  4. #4

    Still the same with latest from SVN

    Quote Originally Posted by ATLAS View Post
    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.
  5. #5
    Your sample is not runable, please provide runable test case

Similar Threads

  1. Replies: 3
    Last Post: Dec 05, 2012, 1:38 PM
  2. [CLOSED] Store.add + grouped GridPanel issue
    By Leonid_Veriga in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 03, 2012, 5:11 PM
  3. Sorting within Grid panel grouped records
    By ssenthil21 in forum 1.x Help
    Replies: 1
    Last Post: Jul 04, 2011, 7:42 AM
  4. [CLOSED] Issue with a Grid render inside a ext:DropDownField
    By asztern in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 20, 2011, 9:34 PM
  5. Replies: 2
    Last Post: Feb 19, 2009, 2:02 PM

Posting Permissions