• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 104
  • Last Modified:

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.
0
lapucca
Asked:
lapucca
1 Solution
 
AndyAinscowCommented:
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

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now