in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Combo-box in header to filter data

Last post 09-14-2007 2:16 PM by C1_GregL. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-27-2007 7:55 AM

    Combo-box in header to filter data

    Hi!

    I would like to be able to filter data in an unbound grid. For this I'd like to have in each column header a combo-box (in which I could fill in all distinct values of that column).
    Selecting a value in a column header's combo-box, I'd like to have only those rows for which the column's value equals the selected value.

    Is something like this possible with the ComponentOne grid?

    Thanks in advance. 
  • 08-02-2007 10:15 AM In reply to

    Re: Combo-box in header to filter data

    We did it but had to code it "the hard way" ourselves. You are I presume describing the AutoFilter capability that is part of Excel. It certainly is possible but it certainly wasn't trivial...
  • 08-09-2007 9:59 AM In reply to

    Re: Combo-box in header to filter data

    Yes, that's what I meant. Thank you.
  • 09-14-2007 2:16 PM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 500

    Re: Combo-box in header to filter data

    This isn't a built-in feature of C1FlexGrid, but it can be done. I've created and attached a sample (C#) that shows a way how.

    The sample uses a comboBox control embeded in a column header. When an item is selected in the combo a filter is applied to the grid.

    Hope it helps
    -Greg L

    Filed under: , ,
Page 1 of 1 (4 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.