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

Loading a report textbox from code

1 Answer 42 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bob Bruce
Top achievements
Rank 1
Bob Bruce asked on 10 Dec 2009, 12:21 PM
I am using VB.Net.  I want to load the value of a textbox from code, such as: Textbox1.value  = "Hello"
or: Textbox1.value = strName

Obviously it's not that simple.  Please advise.

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 10 Dec 2009, 06:11 PM
Hi Bob Bruce,

Actually it is that simple and the code you've pasted is valid when used in the report constructor as it uses the definition item (read more on definition vs. processing here). If you want to change the value based on certain condition, you can use the provided events (e.g. ItemDataBinding) where you use the processing textbox:

Private Sub textBox1_ItemDataBound(sender As Object, e As EventArgs)
    Dim txt As Telerik.Reporting.Processing.TextBox = DirectCast(sender, Telerik.Reporting.Processing.TextBox)
    txt.Value = "hello"
End Sub

Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Bob Bruce
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or