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
94 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
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now