Hide grouping column of a crosstab

2 posts, 0 answers
  1. Ranasinghe,
    Ranasinghe, avatar
    1 posts
    Member since:
    Apr 2015

    Posted 02 Apr 2015 Link to this post

    Hi All

    I am using a crosstab for generating a report. Now there is a new requirement, based on the users input there are some columns to be hide. I did follow some approaches and end up with the same problem.

    1. Use bindings for the column and set visible false. Resulting column not visible but still white space is still there. (this happens only for grouped columns)
    2. Set width to be 0 for the column index. Columns are hidden but space for the header still there and last column header of the grouping is missing

    Is there a way to hide any column including header of the crosstab according to the index of the column from left.

    following is the code i used for set width of columns

    int count = 0;
    var rowGroups = this.crosstab1.RowGroups;
    while (rowGroups != null)
        foreach (var group in rowGroups)
            if (hideColumnIndexes.Contains(count))
                group.ReportItem.Width = new Telerik.Reporting.Drawing.Unit(0.000000,
        if (rowGroups.Any())
            rowGroups = rowGroups[0].ChildGroups;
            rowGroups = null;

  2. Nasko
    Nasko avatar
    1077 posts

    Posted 02 Apr 2015 Link to this post

    Hello Ranasinghe,

    The recommended approach to hide rows/columns in the Crosstab item is using Filtering. You can apply filtering to the row groups or column groups, or apply filtering on the detail rows.
    For more information, please go through the articles in the Filtering Data section.


    See What's Next in App Development. Register for TelerikNEXT.

Back to Top