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

[Solved] UpperCase data columun?

7 Answers 133 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alfa
Top achievements
Rank 1
Alfa asked on 15 Dec 2009, 10:43 AM
Hi,
Can i set formatting for DataColumn\Textbox type columns, so that whatever is type in by user get changed in Upper\Lower case?
My application require it be real-time, not on CellEditEnded event and my column has to fix length.
Rgds
Alfa

7 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 15 Dec 2009, 05:19 PM
Hello Alfa,

 Attached you will find a simple project which demonstrates how to track changes in edit mode.

If you have more questions, please do not hesitate to contact us.


Greetings,
Tsvyatko
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.
0
Alfa
Top achievements
Rank 1
answered on 16 Dec 2009, 04:28 AM
Thanks,
The example gave me the idea how to proceed.
But have you tested the example,
I am getting reverse string in textbox, i.e. 
when i type  "how are you?"
I get "?UO YER AWOH"

and it is because after everyKeyUp\Down the cursor get set at the begining of the textbox.
How do you handle that?

and
What kind of ChildrenOfType<???> i should set, if i want to apply same logic to ComboBox, DateTime and Checkbox type of column.

Rgds
Alfa
0
Tsvyatko
Telerik team
answered on 18 Dec 2009, 10:26 AM
Hello Alfa,

 Indeed you are correct. I have modified the attached project to work correctly.

About the rest of the columns - their data appearance can be changed using IValue Converter

ComboBox - in edit mode you select from list rather writing text

Checkbox - edit checkbox state rather than text

DateTime - ChildrenOfType<TextBox> will work for this (see the sample application)


Hope this helps.

Kind regards,
Tsvyatko
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.
0
Alfa
Top achievements
Rank 1
answered on 18 Dec 2009, 11:44 AM
Thanks
but now the last char is left in lowercase
now the output is
 HOW ARE YOu

Rdgs
Alfa

0
Tsvyatko
Telerik team
answered on 18 Dec 2009, 12:51 PM
Hi Alfa,

Just subscribe to key up and apply the same logic as in key down.

All the best,
Tsvyatko
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.
0
Alfa
Top achievements
Rank 1
answered on 21 Dec 2009, 04:25 AM
Thanks

Do we need to subscribe both KeyUp and KeyDown as you have done in sample application?

Another issue, I can only append the string, if I move cursor anywhere in the string, it comes back to the end.

Are you able to move cursor, say next to J, and make "John" to "J1ohn" ?

Rgds
Alfa
0
Accepted
Tsvyatko
Telerik team
answered on 21 Dec 2009, 10:54 AM
Hi Alfa,

You need to subscribe to both on KeyDown and KeyUp to handle the case when user want to type strings like "00000" by holding the key down.

I have modified the example demonstrating how the cursor position can be handled.

Regards,
Tsvyatko
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
GridView
Asked by
Alfa
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Alfa
Top achievements
Rank 1
Share this question
or