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

Why can't I hide a TextBox/Panel?

1 Answer 120 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Angelo
Top achievements
Rank 1
Angelo asked on 28 Sep 2017, 09:03 AM

Hello. I'm trying to hide a Panel when the Report has different values, I used Visual Studio's break point, panel4.Visible turn "false", but nothing happens and I can't understand why!!

My code is this:

  private void detail_ItemDataBinding(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.DetailSection section = sender as Telerik.Reporting.Processing.DetailSection;
            
            if (section != null)
            { 

                if ((string)section.DataObject["Year"] == Core.Constants.Configuration.Year.ToString())
                {
                    panel4.Visible = false;
                }

            }

        }

 

What am I missing?

 

Thank you for help,

Angelo

 

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 02 Oct 2017, 11:53 AM
Hello Angelo,

Accessing report items in events via their definition is not possible. We recommend using the processing instance of the Panel to set its visibility. This approach is explained in detail in the Changes on items in report events are not applied KB article.

Regards,
Nasko
Progress Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Angelo
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or