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

Change visibility of textfield in groupFooter

3 Answers 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
mSchmidt
Top achievements
Rank 1
mSchmidt asked on 07 Jan 2009, 10:41 AM

Hi iam trying to do the below but it doesnt work

Should i use something else that detailsection ?


 

        private void groupFooterSection1_ItemDataBound(object sender, System.EventArgs e)  
        {  
            Telerik.Reporting.Processing.DetailSection  procDetail = sender as Telerik.Reporting.Processing.DetailSection;  
            DataRowView dataRowView = (DataRowView)procDetail.DataItem;  
            if ((decimal)dataRowView["calculation_bruttoAvance"]==0)  
            {  
                Telerik.Reporting.Processing.TextBox procTxtColor = procDetail.Items["lbBrutto"as Telerik.Reporting.Processing.TextBox;  
                Telerik.Reporting.Processing.TextBox procLblColor = procDetail.Items["txtBrutto"as Telerik.Reporting.Processing.TextBox;  
                procTxtColor.Visible = false;  
                procLblColor.Visible = false;  
            }  
        } 

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 07 Jan 2009, 02:18 PM
Hi mSchmidt,

The detail section is not the sender when you're in the groupFooter section ItemDataBound event. You can find code how to alter report items that are placed in different sections in this KB article.

Greetings,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
mSchmidt
Top achievements
Rank 1
answered on 07 Jan 2009, 02:56 PM
Could you give an example how you would do the things stated in the first question ?
0
Steve
Telerik team
answered on 07 Jan 2009, 03:14 PM
Hello mSchmidt,

We see only a single question and we have answered it. If you take a look at the article we've pointed you to, you would notice how to obtain a reference to the processing report and locate the items you need i.e.:

private void groupFooterSection1_ItemDataBound(object sender, EventArgs e) 
        { 
           Telerik.Reporting.Processing.GroupSection processingPageFooter = sender as       Telerik.Reporting.Processing.GroupSection; 
            Telerik.Reporting.Processing.Report processingReport = processingPageFooter.Report; 
 
            Telerik.Reporting.Processing.TextBox rhName =       (Telerik.Reporting.Processing.TextBox)processingReport.ChildElements.Find("textBox1"true)[0]; 
        rhName.Visible = false
        ... 
    } 


Sincerely yours,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
mSchmidt
Top achievements
Rank 1
Answers by
Steve
Telerik team
mSchmidt
Top achievements
Rank 1
Share this question
or