views:

39

answers:

2

I have a datagrid contains sensitive data, which is, only allows user to read, nothing more (no modifying, no copying,...). How can I archive that? Datagrid has Readonly property, but I think it does not prevent user from copying data.

EDIT: I don't need to prevent user completely from copying data, just not allow them to copy easily mass data.

Thank you so much.

+2  A: 

You COULD try to disable the copy functions. Perhaps you could take over Ctrl-C in a desktop application, and even Print-Screen - they could be 'disabled' for a desktop app. That doesn't ensure that the user doesn't have another software process to take their place.

There's really a lot of effort you could go to, but there are other 'copying' procedures that you wouldn't be able to stop:

  • manual copy (user viewing & typing in data into Notepad)
  • screen scraping tools
  • digital cameras

Are you using a DataGridView in WinForms? It sounds like you were looking for something on the grid to detect + prevent copying. You could try the Enabled property, set to false. That would at least disallow the mass selection by use of the top left button.

alt text

p.campbell
I just want to prevent user from mass and easy copying. Actually, the application is overriding Ctrl+C, but I think there would be an easier way :)
Vimvq1987
A: 

how to do that in web forms???

Maddy
@Maddy: I think you might want to try posting that as a separate question...
KMan