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
101 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 44

Accepted Solution

by:
AndyAinscow earned 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

729 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