Click here to Skip to main content
15,890,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,


Is there anyway which I can have cell validation after I click the load data button and before displaying data in datagridview??
I know I that I can have cell validation when editing in datagridview. However I want viewer's to first see the errors first and then edit.

Please, need for help.

What I have tried:

Import datalist from excel after clicking load button. cell validation when editing.
Posted
Updated 24-Jun-20 22:02pm

1 solution

Until you display the DGV, you can't show the user anything is a useful form. So you would need to either validate the datasource before you apply the data to the DGV - which isn't difficult, though "fixes" may be laborious depending on your data - or you could use the DGV to show "errors" in a different colour perhaps: Colouring DataGridView Cells According to their Content in WinForms[^] may help. he code is C#, but it's pretty obvious and you'd need to use your own validation anyway.
 
Share this answer
 

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