Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Setting DataGridView cell contents to uppercase

Posted on 2006-05-20
3
Medium Priority
?
884 Views
Last Modified: 2012-06-27

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
0
Comment
Question by:alan_ITG
  • 2
3 Comments
 

Author Comment

by:alan_ITG
ID: 16727808

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
0
 
LVL 28

Accepted Solution

by:
iboutchkine earned 750 total points
ID: 16734129
will it work for you

dgv.CurrentCell = dgv(iCol, iRow)
dim s as string = dgv.CurrentCell.Value.ToUpper
 dataGridView.Rows(iCol).Cells(IRow).Value = s
0
 

Author Comment

by:alan_ITG
ID: 16805625

iBoutchkine,

thanks for your help!

Regards,

Alan
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question