|
I am working with a result reporting windows form that is displaying marks of each students, i am assigned to create a custom collumn that will display if mark is in a row is < 75 then fail else pass. I am extracting all records except this pass/fail column from SQL database.
So, How can i add this function means, displaying pass/fail in autogenereated collumns with each rows of datagridview by validation of that rows mark collumn (if value < 75 then print 'fail' in that autogenerated collumn front of particular row).
-Thanks in advanced!!!
NIIT HOUSE GKP INDIA
Please mark the replies as answers if they help and unmark if they don't. | | Nitin Chaudhary Friday, July 31, 2009 7:31 PM | Add column which display fail/pass, and in CellFormating event set the value as Fail or Pass. refer, http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellformatting.aspx
- Marked As Answer byAland LiMSFT, ModeratorTuesday, August 04, 2009 8:25 AM
- Unmarked As Answer byNitin Chaudhary Tuesday, August 04, 2009 4:42 PM
- Marked As Answer byAland LiMSFT, ModeratorFriday, August 07, 2009 12:31 PM
-
| | NareshG Friday, July 31, 2009 8:04 PM | Select col1, col2,..., Status='pass' from table where marks >75 union select col1, col2,...., Status='fail' from table where marks <75
here Status column will be generated at runtime.
- Proposed As Answer byguptashail Tuesday, August 04, 2009 10:13 PM
- Marked As Answer byAland LiMSFT, ModeratorFriday, August 07, 2009 12:31 PM
-
| | guptashail Tuesday, August 04, 2009 10:13 PM | Add column which display fail/pass, and in CellFormating event set the value as Fail or Pass. refer, http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellformatting.aspx
- Marked As Answer byAland LiMSFT, ModeratorTuesday, August 04, 2009 8:25 AM
- Unmarked As Answer byNitin Chaudhary Tuesday, August 04, 2009 4:42 PM
- Marked As Answer byAland LiMSFT, ModeratorFriday, August 07, 2009 12:31 PM
-
| | NareshG Friday, July 31, 2009 8:04 PM | any other ideas? NIIT HOUSE GKP INDIA
Please mark the replies as answers if they help and unmark if they don't. | | Nitin Chaudhary Tuesday, August 04, 2009 4:36 PM | One more thing you can do is modifiey your query which fetch database, In SQL you can use case-when. | | NareshG Tuesday, August 04, 2009 7:19 PM | Select col1, col2,..., Status='pass' from table where marks >75 union select col1, col2,...., Status='fail' from table where marks <75
here Status column will be generated at runtime.
- Proposed As Answer byguptashail Tuesday, August 04, 2009 10:13 PM
- Marked As Answer byAland LiMSFT, ModeratorFriday, August 07, 2009 12:31 PM
-
| | guptashail Tuesday, August 04, 2009 10:13 PM |
|