Grouped cells with a Flexgrid

Posted by: m.mercier on 19 November 2019, 6:34 am EST

    • Post Options:
    • Link

    Posted 19 November 2019, 6:34 am EST

    Hello,

    I have an issue with the componentone flexgrid. I grouped cell using this

     
    Dim rng As CellRange = .GetCellRange(0, 0, 0, .Cols.Count - 1)
    rng.Data = "Animal"
    
    

    At this point, no problem. Nevertheless, if i make a filter on the grouped column header (the “Animal” one) i see the filter mark in the column header, but if i make a filter on one of the “normal” column header (those wich are under the “Animal” one), then i don’t see the filter mark. The filter is ok, but i am not able to see wich column was filtered.

    Anyone knows how to do to see the filter mark even on grouped columns header ?

  • Posted 20 November 2019, 2:19 am EST

    Hello,

    When you have multiple fixed rows and you want to show the Filter Glyphs on the particular row, you can set the GlyphRow property of the Row class as shown in the code snippet below :

    c1FlexGrid1.Rows.GlyphRow = 0;
    
    

    By default it shows Glyphs on the last(lowest) fixed row.

    If you want to set the filtered icon on all the fixed rows after column being filtered, you can set the filtered icon by handling the OwnerDrawCell event as shown below :

    private void C1FlexGrid1_OwnerDrawCell(object sender, OwnerDrawCellEventArgs e)
    {
        if(c1FlexGrid1.Cols[e.Col].Filter.IsActive && e.Row == 0)
          {
             e.Image = c1FlexGrid1.Glyphs[GlyphEnum.FilteredColumn];
          }
    }
    

    Please go through the attached sample for reference.

    Regards,

    Prabhat Sharma.

    FlexGridFilterIconDemo.zip

  • Posted 21 November 2019, 4:57 am EST

    Thank you ! It works !

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels