Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2015-01-30
2
Medium Priority
?
103 Views
Last Modified: 2015-02-24
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
Comment
Question by:lapucca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 45

Accepted Solution

by:
AndyAinscow earned 2000 total points
ID: 40581202
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
 

Author Comment

by:lapucca
ID: 40584480
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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question