in

C1 Community

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

Group problem

Last post 05-09-2008 4:39 AM by C1_AlexI. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-07-2008 4:12 AM

    Group problem

    Hi,

    how can i hide the grouped column in a C1DataGrid?

    Thank's

  • 05-07-2008 6:17 AM In reply to

    Re: Group problem

    Column.Visibility = Collapsed
     
    The C1DataGrid.GroupByColumns.CollectionChanged event allows you to listen to group by condition changes.
     
    Thanks,
    Alex
     
    >
    > <halley73> wrote in message news:204612@10.0.1.98...
    > Hi,
    >
    > how can i hide the grouped column in a C1DataGrid?
    >
    > Thank's
    >
    >
    >
    > --------------------------------------------------------------------------------
    > http://helpcentral.componentone.com/cs/forums/p/75174/204612.aspx#204612
    >
    >
  • 05-07-2008 6:30 AM In reply to

    Re: Group problem

    If i set Collapsed to a column it disappear from the table and from the GroupByArea and i can't see it ...

  • 05-09-2008 4:39 AM In reply to

    Re: Group problem

    Sorry, those was a wrong suggestion.
     
    I attached the sample that implements this behaviour. Note that it will work with the build 3.0.20082.49 or later.
     
    The key points are:
    1) The sample redefines the C1DataGrid.UniversalItemContentTemplate. The custom template is an exact copy of the original template with the CellsAutoLayoutPresenter element replaced with the custom HideGroupedCellsAutoLayoutPresenter element implemented in the sample. The template is for the default tabular view with vertical row distribution. For the other views you need to get a corresponding template from XAML sources and replace the CellsAutoLayoutPresenter element with HideGroupedCellsAutoLayoutPresenter.
    2) The HideGroupedCellsAutoLayoutPresenter class is derived from CellsAutoLayoutPresenter and overrides the GetColumnCollection method so as the returning collection contains only non-grouped columns from the C1DataGrid.ActualOrdinaryColumns collection.
     
    In the future builds we'll add a property controlling this behaviour, so retemplating will not be needed.
     
    Thanks,
    Alex
    <halley73> wrote in message news:204615@10.0.1.98...

    If i set Collapsed to a column it disappear from the table and from the GroupByArea and i can't see it ...



    http://helpcentral.componentone.com/cs/forums/p/75174/204615.aspx#204615

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