Home Forums WinForms controls Xceed Grid for WinForms Exclude filtering Group from showing up in GroupByRow?

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

    According to the documentation, you can filter the data in the grid by using a collapsed Group to hide DataRows. This works great, but when the GridControl has a GroupByRow, the custom Group is also displayed and can be manipulated by the user. Is there a way to exclude this custom Group from showing up in the GroupByRow?

    Imported from legacy forums. Posted by Tommy (had 2841 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Tommy,

    Using custom grouping instead of setting the Visible property of each unwanted dataRow is a neat trick to gain performance when filtering.

    However, the groupByRow’s built-in behavior is a mixed-blessing in this situation. There is no way to prevent the custom group from showing up in the GroupByRow or to prevent user-interaction on this precise group.

    The only two solutions I can think of are either disabling user-interactive grouping modification, by setting the GroupByRow’s AllowGroupingModification property to False, or, if performance is less of an issue in your scenario, to filter dataRows using the Visible property to False on the unwanted dataRows.

    If you are interested in the second option, refer to the “extensibility” sample of the Xceed Grid Live Explorer sample. It shows how to create a dynamic FilterRow that plays around with the visible property of rows to filter data.

    Imported from legacy forums. Posted by PL (had 476 views)

    User (Old forums)
    Member
    Post count: 23064

    Are there any plans to include a filtering mechanism in a future version? Maybe even a simple QueryDataRowVisible-event, like this:<pre>grid.QueryDataRowVisible += HandlerGridQueryDataRowVisible;
    void HandlerGridQueryDataRowVisible(object sender, QueryRowVisibleEventArgs e) {
    if ((bool)e.DataRow.Cells[“Discontinued”].Value)
    e.Visible = false;
    }</pre>

    Imported from legacy forums. Posted by Tommy (had 290 views)

    Odi [Xceed]
    Spectator
    Post count: 426

    We analysed your above request and it seems that even that simple event would take enough work to have to place this on a priority list (issues foreseen: the event would be raised often and we’d need to make sure it doesn’t slow down the grid, and the scrollbar thumb that may jerk around as we scroll down, since we rely on the paintable row counts to determing the thumb size). I can’t say it will make it into the development pipeline for the next upcoming releases.

    +1 request for filtering noted.

    Imported from legacy forums. Posted by Odi [Xceed] (had 3905 views)

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