How to notify users about required columns when they check a checkbox column in Edit mode of Gridveiw control?

Hi, I'm using vs2012.
I only want 3 of the columns to require users to fill in content when they check a checkbox column.   How can I do alert the user and stop user when they Click the Update button after editing a row in gridview control and cancel the Update?

thank you.
lapuccaAsked:
Who is Participating?
 
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
Assuming your current code in the UpdateButton is something like the following pseudo code:
ButtonClick
{
  UpdateDatabase
}

then change it to
ButtonClick
{
  if NOT CheckAllRequiredFieldsAreFilled
    MessageToInformUserToFillAllRequiredFields
  else
    UpdateDatabase
  end if
}
0
 
lapuccaAuthor Commented:
My gridview control is set to auto-generate the Edit and Update button.  How do you set the message when that Update button is checked?  Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.