Click here to Skip to main content
15,917,177 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a datagridview, in which one of the columns have real data. I want that this column to show the data look blurred when I release the project so that nobody can read this data. Can anyone help me on that.I would be grateful if you could illustrate with some code in vb.net 2010.

What I have tried:

1.I looked up the datagridview properties and functions.
2. ForeColor property of datagridview.
Posted
Updated 25-May-17 22:37pm
Comments
CHill60 25-May-17 6:54am    
Why put the data in there if you don't want anyone to see it??
Arvind61 26-May-17 1:09am    
Its a sensitive data. And the form containing the data has to be published for demo purposes.

1 solution

You have a few options:

1. Don't show the data in the first place. You have commented that the form containing the data has to be published for demo purposes but I contend that one column missing from the datagridview in the demo will not "break" it.

2. Obfuscate the column - I guess this is what you mean by "blurred text". As far as I know you would have to layer something over the data or use an unreadable font.

Both the above involve changing your software purely for the demo - that's a bit step and somewhat risky. A far better approach is ...

3. Don't use sensitive data for your demo! In many companies it is (quite rightly) forbidden to use genuine user information for testing and demonstrations. Have a copy database that has obfuscated data in it - either generated randomly or generated from real data (see this search for ideas on how to achieve that - Google[^] - I don't have any recommendations which is why I've posted the search results rather than a single article, although I did find this on CodeProject Strings Obfuscation System[^]
 
Share this answer
 
Comments
Arvind61 26-May-17 5:33am    
Actually the column contains mobile numbers. Now if I generate random mobile nos. they would also be real. Using unreadable characters will spoil the appearance of the form. I ve seen blurring of data in some applications but I am not able to implement it.
CHill60 26-May-17 5:37am    
I believe it's possible in WPF and browser apps, but you are using a DataGridView so I'm assuming this is WinForms.

[EDIT] - you could try doing something with the paint event - see advanced TextBox[^]
CHill60 26-May-17 5:40am    
"Now if I generate random mobile nos. they would also be real" - not necessarily and more to the point, they wouldn't be sensitive data any more because they would be ...er ... random.
Arvind61 26-May-17 5:59am    
Thanks CHill60. I will try the link advanced TextBox.

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