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

Format Value for textbox

2 Answers 278 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 2
David asked on 27 Sep 2010, 11:07 AM
Hi,

I'm setting the value of a text box on the group section Item Data Bound. The text box is formatted to currancy but this is being ignored if I set the value programmatically, is there anyway to format the value to currancy and then set the value of the textbox?

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 29 Sep 2010, 03:47 PM
Hi David ,

If you set a numeric value to a TextBox item the currency Format should be kept. Please make sure that you set the textbox to a numeric value. Locally we have set the textbox value within a group section ItemDataBound event and the currency format was kept as expected.

private void groupHeaderSection1_ItemDataBound(object sender, EventArgs e)
{
    var procGroupHeader = (Telerik.Reporting.Processing.GroupSection)sender;
    var procTextBox = (Telerik.Reporting.Processing.TextBox)procGroupHeader.Report.ChildElements.Find("textBox1", true)[0];
    procTextBox.Value = 2222;
}

Let us know whether the suggestion helps and if you still experience any difficulties we will appreciate if you elaborate further on your scenario and/or send us a sample report through the support system to advise you accordingly.

Greetings,
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
CEFRA
Top achievements
Rank 1
answered on 05 Jun 2012, 10:41 PM
if i want to get a value from this textbox and save in a DIM VAR INT
how i cant do it ??
Tags
General Discussions
Asked by
David
Top achievements
Rank 2
Answers by
Peter
Telerik team
CEFRA
Top achievements
Rank 1
Share this question
or