Home Forums WPF controls Xceed DataGrid for WPF Avoid grouping by specific column(s)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24863 |

    Hi group, how can I stop (either in XAML or programmatically) a specific column from being used as a grouping criterion? E.g. let’s say I have a simple data grid like:

    <xcdg:DataGridControl x:Name=”dummy” AutoCreateColumns=”False”
    ReadOnly=”True”>
    <xcdg:Column FieldName=”id” Title=”first name” Width=”30″/>
    <xcdg:Column FieldName=”year” Title=”year published” Width=”60″/>

    </xcdg:DataGridControl>

    I’d like the user to be able to group by any column (e.g. year) EXCEPT by id, which would have no meaning as this value is unique by definition. How can I do this?

    Imported from legacy forums. Posted by Mathetes (had 508 views)

    Xceed Support
    Member
    Post count: 5658

    You can prevent all columns from being a grouping source by setting the AllowGroupModifications property of the GroupByControl to false.

    Preventing a single column from being a grouping source is currently on our feature list.

    Imported from legacy forums. Posted by Jenny [Xceed] (had 2703 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.