Click here to Skip to main content
15,894,646 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi everyone,

i have a data grid view with to columns...
i set the read only property of rows to false, so when i click on the row it enters into editing mode
and we can type in the row itself


but here i want is when user click on the cell it should get into editing mode, but user should not allow to type letters in that row...


means we should not allow text, entering in the row...
how to set that property?
when we click on row, it should enter into editing mode, but when we enter text, the text in row should not change, means entering text should be disabled...
so please help me in this
Posted
Updated 17-Sep-14 21:04pm
v2
Comments
Richard MacCutchan 18-Sep-14 3:29am    
That makes no sense at all. Why do you want the cell to be put into edit mode if you don't want to allow the user to do any editing?
Sinisa Hajnal 18-Sep-14 3:29am    
If it enters editing mode...why would you allow that if the user may not enter anything? Do you maybe think that user may not enter letters, but only numbers (or other characters)? Describe a bit better what you need. Thank you.

1 solution

That's not a good solution form a user perspective - think about it: If you provides a facility where it looks like the user can type then you are going to confuse and annoy him if he can't actually do it.

You can probably do it by handling the individual Cell keyboard events, but...nasty from a use point of view. Very nasty.

I'd make the whole thing read only myself.
 
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