Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to assign grades to numbers in datagridview like this.
Column1. | Column 2
200. | Grade A
390. |. Grade B
321. |. Grade C
228. |. Grade D
235. |. Grade E


This is how I want my program to look like but I've already generated column1 from. But I don't know how to check the largest number and attach the grades to it respectively.

I don't know how to go about it so I have no codes so far
Posted
Comments
OriginalGriff 23-Jan-16 7:57am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Sorry, but that doesn't make a lot of sense - there is no obvious relation between your Column1 and Column 2 - A is 200, B is 390, C is 321, and so on.
Use the "Improve question" widget to edit your question and provide better information.
Richmond Boateng 23-Jan-16 8:10am    
What I meant was I've already displayed colum1 from the database. But I want know how to display the grades according to the largest and to the lowest number. Meaning the lowest number will get the "grade D".
OriginalGriff 23-Jan-16 8:24am    
That isn't what your example is showing, and what happens if there are 6 results? 27? We don't know these things, and we have no idea what you have in your code to "play with"! :laugh:
So take a step back, and then try to type up your problem as if you were explaining it to your mother over the phone - that way what you tell us should include all the info we need to help you.
Richmond Boateng 23-Jan-16 8:28am    
I would be glad you say you don't have any idea rather than saying "we". What has this issue got to do with my mum. Please try to be ethical. The fact that you don't have an idea doesn't mean no one is also having.
Anyway thanks for your comments
Richmond Boateng 23-Jan-16 8:31am    
When answering a question please:
Read the question carefully.
Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.





I hope you have read this?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900