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

Changing the value of a textbox doesn't work right

2 Answers 209 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dave Hayward
Top achievements
Rank 1
Dave Hayward asked on 24 Feb 2010, 01:28 PM
In my report, I want to change the value of a textbox based on the value of the row data. I can't really use an expression because I may need to do a additional data lookup (depending on the data). Instead, I use the detail_ItemDataBound method to process the row data and change the text. At the same time (using the same method) I also change the visibility of another text box.

When I run the report, the visibility works fine, but the text is only changed on the row after the one being processed (the text for row n is displayed on row n+1). 

Is detail_ItemdataBound the right place to do this processing? Would detail_ItemDataBinding be better?

When do I use each one?

TIA.

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 26 Feb 2010, 04:27 PM
Hello Dave Hayward,

The most probable cause for that behavior is because you had set the new value to the textbox definition. Instead when you are in a DateBound event you have to use the Proccessing items.

Check out the following help articles:
Report Life Cycle
Understanding Events

I have attached a sample that demonstrates how to accomplish your task and demonstrates the behavior your have experienced using the textbox definition item.

Kind regards,
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.
0
Dave Hayward
Top achievements
Rank 1
answered on 26 Feb 2010, 05:56 PM
Steve,

I realized my mistake soon after posting. I was finding the 'processing' data object for controlling the visibility of one control, but using the definition object for controlling the text. It was pilot error and not pilot ignorance.
Tags
General Discussions
Asked by
Dave Hayward
Top achievements
Rank 1
Answers by
Peter
Telerik team
Dave Hayward
Top achievements
Rank 1
Share this question
or