This is a migrated thread and some comments may be shown as answers.

Setting the Width of a GroupSection programatically

1 Answer 63 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ernani Cecon
Top achievements
Rank 1
Ernani Cecon asked on 12 Mar 2010, 04:44 AM
I want to build a report in which, based on some conditions, I don't want a column to be visible. I've configured conditional formatting on the report items that are part of that column, and it works. However, I want to shorten the width of the GroupSection where the header of the column is placed, in case it is not visible. Then I implemented the ItemDataBinding event tied to the GroupSection, but I figured out that the Width property doesn't exist to be set programatically for a GroupSection! Am I missing something? It's funny I can set the width from the designer in VS for a GroupHeader, but I can't do it programatically.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 17 Mar 2010, 10:12 AM
Hello Ernani Cecon,

We are not sure that we understand what you're trying to achieve. First can you clarify whether you refer to our Table item or when you say column you mean a textbox in the detail section that "forms" a column? If it is the latter and you want to hide Table columns in an event there is no out of the box solution. We can suggest two possible approaches:

  • To auto generate the columns as done in the following forum post (some coding is involved).
  • To hide the table columns as my colleague explained in the following forum post. You have to apply a filter to a column group which always evaluates to false, that will prevent the corresponding table column from appearing. If the column group is static (i.e. it has no grouping criteria specified) you need to make it dynamic first (e.g. by specifying a grouping criteria which groups by a constant value (no additional coding is involved).

Let us know if further help is needed.

All the best,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Ernani Cecon
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or