Disable GridView Controls in Edit Mode

  • Thread starter GridView Newbie
  • Start date
G

GridView Newbie

I have a business requirement stating that when the Location Type is "C" the
user should not be able to update the StoreNumber. So, when the user clicks
the "edit" button in the GridView for a row, I need to check the value of
location type for that row and then disable the control for the Store Number.

The problem is I only need to do this when editing. I have put the logic in
the DataRowBound event. In the RowEditing event a application variable is
set indicating that the mode if "Edit".

Is there a better way to do this? Is there something already built into the
GridView that could make this checking easier? Thanks in advance for any
help!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top