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

How to change textbox.value to upper case

2 Answers 1357 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Cristian
Top achievements
Rank 1
Cristian asked on 23 Aug 2011, 08:23 PM
Hi guys I have the next problem, I'm working with telerik reporting tool and I have some textboxes that shows some values from database, is it possible to change this values to uppercase if they are shown in lowercase? I mean if a text box shows "cristian" change it to "CRISTIAN"
I've tried the next in my Report1.designer.cs file

this.textBox1.Value = "Nombre del niño(a):{Fields.fcNomMenor+\" \"+ Fields.fcPatMenor+\" \"+ Fields.fcMatMen" + 
                "or}".ToUpper(); 
    
and 
    
    
 this.textBox1.Value.ToUpper( = "Nombre del niño(a):{Fields.fcNomMenor+\" \"+ Fields.fcPatMenor+\" \"+ Fields.fcMatMen" + 
                "or}");
But nothing seems to work.
Hope your help.

2 Answers, 1 is accepted

Sort by
0
Vasssek
Top achievements
Rank 1
answered on 16 Feb 2012, 07:25 AM
Hi,

You should create user function and the call it in text box field expression:

public static string FormatToUpperCase (string inputText)
{
    return String.Format("{0}", inputText.ToUpper());
}

Best Regards

Vasssek
0
Steve
Telerik team
answered on 16 Feb 2012, 09:26 AM
Hi guys,

When you write an expression, you can access a member of an object, so you can directly do this:

=Fields.fcNomMenor.ToUpper()

This information is available in the Member Access help article.

Kind regards,
Steve
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
General Discussions
Asked by
Cristian
Top achievements
Rank 1
Answers by
Vasssek
Top achievements
Rank 1
Steve
Telerik team
Share this question
or