473,383 Members | 1,716 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Web pages with multiple grids and validation controls - confirm delete problems

I am developing a web application that utilises multiple
grids, panels, validation controls etc on the same page.

I have added the appropriate code to pop up dialogs to
confirm delete in datagrids using the ItemCreated event,
template colums and the Button.Attributes.Add
("onclick", "return confirm('Are you sure you wish to
delete this row?');"). This works fine in some instances
when you click on the delete button but not always.

I would also like to add multiple buttons in each row of
the datagrid with other confirmation messages. I have got
this to work but have the same problem that the
confirmation messages art not always displayed.

I have done extensive research into this and find that if
you have validation controls on the same page as a
datagrid or multiple datagrids on the same page using the
above delete methodolgy it is a known limitation (see
http://www.dotnet247.com/247referenc.../9/47917.aspx).

This article talks about using code similar to the code
below to get around the problem but does not go into any
detail.

---------------------------------------------------------

Let's suppose that your onsubmit event handler is named
MyOnSubmit().
Add the following onload event handler to your page:

var VSSubmit

function OnLoad() {
VSSubmit = __doPostBack;
__doPostBack = OnSubmit;
}

This saves a reference to __doPostBack in VSSubmit and
substitutes the
original reference with a reference to our own OnSubmit
handler, which has
the same signature as doPostBack:

function OnSubmit(eventTarget, eventArgument) {
MyOnSubmit();
VSSubmit(eventTarget, eventArgument);
}

This function calls your event handler before calling
__doPostBack via the
reference that we stored before.
This works perfectly on all relatively recent browsers,
including NS4.7

---------------------------------------------------------

Can anyone point me in the right direction to resolve my
problem?

TIA
Nov 22 '05 #1
0 780

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Richard Payne | last post by:
I am developing a web application that utilises multiple grids, panels, validation controls etc on the same page. I have added the appropriate code to pop up dialogs to confirm delete in...
0
by: Richard Payne | last post by:
I am developing a web application that utilises multiple grids, panels, validation controls etc on the same page. I have added the appropriate code to pop up dialogs to confirm delete in...
4
by: Tim Meagher | last post by:
I am trying to use both validation controls and to add submit button attributes, but when I add the button attributes, the javascript fpr the validation controls is no longer created for the page. ...
3
by: Rick | last post by:
I have an interesting problem when I run the following code in Netscape (7.02) vs. IE. This page works great in IE and all my controls bring up the validation summary dialog box if the required...
3
by: D. Shane Fowlkes | last post by:
Sorry for the length of this post. I have created a rather complex form which has a header/line item (parent and child records) structure. It's for an intranet. A screenshot can be seen here: ...
1
by: Simon | last post by:
Hi, Has anyone experienced the problem where validation controls stop a previously working page from submitting. Sometimes, when I move between my work machine and my home machine validation...
2
by: Roh | last post by:
Hi, Can we use Javascript and .Net Validation controls on the same page. If yes how? Please provide some examples which will help me a lot....thanks.
2
by: VB Programmer | last post by:
I have several required field validators on each step of my CreateUserWizard. When I click Next it goes to the next step, even though the user hasn't typed anything in. I placed each "page"...
6
by: Peter Afonin | last post by:
Hello, I'm creating an application in ASP.NET 1.1. I need to check whether at least one checkbox in my datagrid has been checked. To do this, I'm using Javascript - I'm adding this code to...
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.