This topic contains 3 replies, has 3 voices, and was last updated by  Manish Gupta 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #81991

    jong1
    Member

    I just started an Angular2 project with FlexGrid and I must say I love it. However, I’m, having a minor UI issue that I’m sure has an easy fix, but I can’t figure it out 🙁

    I have a custom cell template that has 4 lines of text and an image. Thus, each Row is roughly 100px high. I’ve also implemented “group by” functionality in my grid and it works as expected. However, the “group by” row headers are the same height as each row. The “group by” headers have 1 line of text and thus don’t need to be this tall. However, it seems that Flexgrid is calculating the row heights and applying the same height to the “group by” headers regardless of the amount of content they contain.

    How do I make my “group by” headers smaller?

    #103786

    I also need this

    #103787

    Sorry clicked submit to early. I did like this

    import { WjGridModule } from 'wijmo/wijmo.angular2.grid';
    import { WjInputModule } from 'wijmo/wijmo.angular2.input';
    
    import * as wjcInput from 'wijmo/wijmo.input';
    import * as wjcGrid from 'wijmo/wijmo.grid';
    import * as wjcCore from 'wijmo/wijmo';
    
    wjGridItemFormatter(flex: wjcGrid.FlexGrid, e: wjcGrid.FormatItemEventArgs) {        
       // add/handle check box for grouped rows
      if (e.panel.rows[e.row] instanceof wjcGrid.GroupRow && e.panel.cellType !== wjcGrid.CellType.RowHeader) {
           const row: wjcGrid.GroupRow = e.panel.rows[e.row];
           row.height = 40;
      }
    }
    
    <wj-flex-grid (formatItem)="wjFlexGridItemFormatter(accountsControlsFlexGrid, $event)">
       <wj-flex-grid-column header="Select" binding="select">
              <input type="checkbox" enabled />
       </wj-flex-grid-column>
       <wj-flex-grid-column header="ID" binding="controlId" isReadOnly=true></wj-flex-grid-column>
    </wj-flex-grid>
    #103887

    Manish Gupta
    Moderator

    Wijmo Subscriber

    Answer

    Hi Gopal,
    Thank you for sharing your answer here. This is the recommended way for resetting group header height.

    Thanks,
    Manish Kumar Gupta

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.