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

detail_ItemDataBound

1 Answer 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Zed
Top achievements
Rank 1
Zed asked on 30 Jul 2008, 04:04 PM
Thie example does not seem to work.   I want to catch the report and find an integer value and replace it with a string.  Do you know how to do that?
I do not see many examples. 

  private void detail_ItemDataBound(object sender, System.EventArgs e)
        {
            Processing.DetailSection section = sender as Processing.DetailSection;
            Processing.ReportItemBase extraShipping = section.Items.Find("extraShippingCostTextBox", false)[0];
            DataRowView row = section.DataItem as DataRowView;
            if (null != row)
            {
                object val = row.Row["Weight"];
                if (!(val is DBNull) && ((decimal)val) > 10)
                {
                    extraShipping.Visible = true;
                }
                else
                {
                    extraShipping.Visible = false;
                }
            }
        }

1 Answer, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 31 Jul 2008, 08:45 AM
Hi Zed,

Correct if I am wrong but this code snippet is taken from the Events sample report. If you open it from the online demos you can see the "Extra Shipping Cost" labels that appear at the end of the 2nd page and further.

Can you please explain what exactly is the problem and what is your goal?

Greetings,
Svetoslav
the Telerik team

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