Link to home
Start Free TrialLog in
Avatar of alan_ITG
alan_ITGFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Setting DataGridView cell contents to uppercase


Hi,

A simple thing....I thought.

In a new row for data in datagridview, change the data entered by the user to uppercase.  

Any ideas?

I have tried:

Intercepting the e.proposedvalue property and changing it there... no joy
Intercepting the cellleave event and changing there...no joy
I am looking at intercepting it in the stored proc in the SQL database, but there must be a way to accomplish this simply in the front end.

Regards,


Alan
Avatar of alan_ITG
alan_ITG
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER


Hi,

I have solved this by using Stored Procedures as the method for managing the TableAdapter/Db relationships and then amending the stored procedure to use UPPER() on the relevant values.  The result of this is that the data in the DataGriedView remains in the case submitted by the user until a save operation takes place, when it is returned as uppercase.

I would still like to manage this in the DataGridView (DGV) and am looking at the formatting options available and original/proposed values for the DGV to see if this is where I should make the required changes.

Still, any insight would be useful.

Regards,


Alan
ASKER CERTIFIED SOLUTION
Avatar of iboutchkine
iboutchkine

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

iBoutchkine,

thanks for your help!

Regards,

Alan