Search:
Namespaces
Discussions
.NET v1.1
Feedback
SV: Re: SV: Re: Confirm delete after Cancel in Datagrid/EditColumn (NOT ANSW ERED AND DRIVING ME NUTS)
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngescalate' list
.
=?iso-8859-1?Q?Andr=E9_Colbi=F6rnsen?=
You didn't read my message thoroughly ;)
'Customers/Customer Accounts' then Click 'Order' <=3D=3D=3D=3D=3D=3D =
CUSTOMERS
Click: 'X' to delete (you get the confirmation dialogue)
Click: 'E' and then 'X' (you get the confirmation dialogue)
Click: 'E' and then 'C' and then 'X' (the record is deleted without
warning)
Click: 'E' and then 'U' and then 'X' (the record is deleted without
warning)
It's only the CUSTOMER page that causes this problem. It has 3 different
grids of which at least 1 is always hidden. That is probably why this
problem arises.
Regards/Halsningar
Andre Colbiornsen
--------------------------------------
Sonnenburg Communications
Bergsgatan 3,
SE-211 54 Malm=F6
Sweden
Tel.: +46-(0)40-97 78 80
Fax.: +46-(0)40-97 78 80
Mob.: +46-(0)708-97 78 79
Mail:
Click here to reveal e-mail address
Web.: www.sonnenburg.se
--------------------------------------
B2B Web agency - Specializing on .Net
--------------------------------------
-----Ursprungligt meddelande-----
Fr=E5n: Dennis West [mailto:
Click here to reveal e-mail address
]=20
Skickat: den 21 maj 2002 19:51
Till: aspngescalate
=C4mne: [aspngescalate] Re: SV: Re: Confirm delete after Cancel in
Datagrid/EditColumn (NOT ANSW ERED AND DRIVING ME NUTS)
I don't see what you mean, I pressed delete and the car disapears, I get
a the confirm message and I tried all kinds of combinations and it
worked ...
I click delete button and then canceled the delete and it worked in all
combinations....
You will need to be very very very specfic in what steps i must do in
order to see the problem...
But it work fine here so far...sure like your store.
----- Original Message -----
From: "Andr=E9 Colbi=F6rnsen" <
Click here to reveal e-mail address
>
To: "aspngescalate" <
Click here to reveal e-mail address
>
Sent: Tuesday, May 21, 2002 7:02 AM
Subject: [aspngescalate] SV: Re: Confirm delete after Cancel in
Datagrid/EditColumn (NOT ANSW ERED AND DRIVING ME NUTS)
Well Dennis,
This doesn't work. I loose the clientside OnCLick eventhandler e.g when
I have click the EDIT button and later pressed CANCEL. The record is
then deleted without warning.
Go here to see what I mean:
http://213.67.33.251/storeadmin
Login as:
Guest/guest
Choose:
'Customers/Customer Accounts' then Click 'Order'
Click: 'X' to delete (you get the confirmation dialogue)
Click: 'E' and then 'X' (you get the confirmation dialogue)
Click: 'E' and then 'C' and then 'X' (the record is deleted without
warning)
Click: 'E' and then 'U' and then 'X' (the record is deleted without
warning)
Somehow, the grids are not rebound (even if databind is called), which
is why the delete button does not get the clientside 'OnClick' attribute
added.
Regards/Halsningar
Andre Colbiornsen
--------------------------------------
Sonnenburg Communications
Bergsgatan 3,
SE-211 54 Malm=F6
Sweden
Tel.: +46-(0)40-97 78 80
Fax.: +46-(0)40-97 78 80
Mob.: +46-(0)708-97 78 79
Mail:
Click here to reveal e-mail address
Web.: www.sonnenburg.se
--------------------------------------
B2B Web agency - Specializing on .Net
--------------------------------------
-----Ursprungligt meddelande-----
Fr=E5n: Dennis West [mailto:
Click here to reveal e-mail address
]
Skickat: den 21 maj 2002 17:05
Till: aspngescalate
=C4mne: [aspngescalate] Re: Confirm delete after Cancel in
Datagrid/EditColumn (NOT ANSW ERED AND DRIVING ME NUTS)
Here is the only method I know of todate.
http://aspalliance.com/dotnetsolutions
/GetSolution.aspx?ID=3D12795" target="_blank">
http://aspalliance.com/dotnetsolutions
/GetSolution.aspx?ID=3D12795
over 2500 ASP.NET solutions at
http://aspalliance.com/dotnetsolutions
sign-up for daily updates
----- Original Message -----
From: "Andr=E9 Colbi=F6rnsen" <
Click here to reveal e-mail address
>
To: "aspngescalate" <
Click here to reveal e-mail address
>
Sent: Tuesday, May 21, 2002 5:50 AM
Subject: [aspngescalate] Confirm delete after Cancel in
Datagrid/EditColumn (NOT ANSW ERED AND DRIVING ME NUTS)
I have had no answers to this at aspngdatagridrepeaterdatalist after
many attempts (and it has not appeared in the Escalate list either in
spite of me sending it there several days ago)!!!!!!!!!! so I am trying
again to escalate. I suspect it has something to do with viewstate.
ORIGINAL PROBLEM:
"I'm having a problem finding a way to add onClick=3Dreturn confirm to a
button after having cancelled an update or updated. I have no problem
adding the attributes OnItemDataBound for item, alternating item and
edit item, but if I press the deletebutton after having updated the
record, the record is deleted without warning. Can anybody give me some
advice on this one?"
SCENARIO:
I have 3 datagrids in 1 web form 2 of the grids are hidden in an
invisible tablerow at pageload. When a button (orders) is clicked, the
first tablrow becomes invisible and the second visible. This tablerow
has 2 datagrids of which 1 is visible. If a linkbutton in this grid is
clicked, the third grid becomes visible. Now this is where my problems
arises. The datagrids are bound to 2 tables in a dataset "Products" and
"Orders". As I explain above, I have added the 'return confirm' to the
delete buttons in 2 of the datagrids on DataGrid_ItemDataBound, using:
"ListItemType.Item Or itemType =3D
ListItemType
.AlternatingItem Or
itemType =3D
ListItemType
.EditItem"
If I now try to delete an item I get the dialogue, as well as if I have
Edit activated. The rendered HTML looks like this:
'<input type=3D"submit" name=3D"dgrOrderDetails:_ctl2:btnDelOrder" =
value=3D"X"
id=3D"dgrOrderDetails__ctl2_btnDelOrder" class=3D"btnStoreAdmin"
onclick=3D"return confirm('Are you sure you want to delete this order:
180?');" />'
But after having clicked the cancel button (or the update button) the
rendered HTML now look like this:
'<input type=3D"submit" name=3D"dgrOrderDetails:_ctl2:btnDelOrder" =
value=3D"X"
id=3D"dgrOrderDetails__ctl2_btnDelOrder" class=3D"btnStoreAdmin" />'
The onclick event is not there anymore!! And yes I rebind the data to
the grid. Is there anybody out there who can shed some light on this?
It's driving me nuts!!! ;P I might add that I only have this this
problem with this page carrying 3 different grids. On a page with only
one datagrid everything is hunky dory.
I have since worked with a scenario which dynamically creates buttons
OnItemDataBound. What happens now is that the buttons disappear (or
rather are not created) when I press 'Cancel' or 'Update'. For some
reason, the data is not rebound to my grids on 'Cancel' and 'Update'
even though I'm calling DataBind() on both events.
Regards/H=E4lsningar
Andr=E9 Colbi=F6rnsen
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
Sonnenburg Communications
Bergsgatan 3,
SE-211 54 Malm=F6
Sweden
Tel.: +46-(0)40-97 78 80
Fax.: +46-(0)40-97 78 80
Mob.: +46-(0)708-97 78 79
Mail:
Click here to reveal e-mail address
Web.: www.sonnenburg.se
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
| [aspngescalate] member
Click here to reveal e-mail address
=3D YOUR ID=20
|
http://www.asplists.com/asplists/aspngescalate.asp
=3D JOIN/QUIT
| [aspngescalate] member
Click here to reveal e-mail address
=3D YOUR ID=20
|
http://www.asplists.com/asplists/aspngescalate.asp
=3D JOIN/QUIT
| [aspngescalate] member
Click here to reveal e-mail address
=3D YOUR ID=20
|
http://www.asplists.com/asplists/aspngescalate.asp
=3D JOIN/QUIT
| [aspngescalate] member
Click here to reveal e-mail address
=3D YOUR ID=20
|
http://www.asplists.com/asplists/aspngescalate.asp
=3D JOIN/QUIT
Reply to this message...
Dennis West
well I would not assume that the javascript is at fault in that case since
it not work, in the case your talking about .. i would assume the script
doesn't see the delete button being pressed. I can't help you on this combo
problem unless you need to have a case tree of three scripts(???) to one
delete...
----- Original Message -----
From: "André Colbiörnsen" <
Click here to reveal e-mail address
>
To: "aspngescalate" <
Click here to reveal e-mail address
>
Sent: Tuesday, May 21, 2002 9:00 AM
Subject: [aspngescalate] SV: Re: SV: Re: Confirm delete after Cancel in
Datagrid/EditColumn (NOT ANSW ERED AND DRIVING ME NUTS)
You didn't read my message thoroughly ;)
'Customers/Customer Accounts' then Click 'Order' <====== CUSTOMERS
Click: 'X' to delete (you get the confirmation dialogue)
Click: 'E' and then 'X' (you get the confirmation dialogue)
Click: 'E' and then 'C' and then 'X' (the record is deleted without
warning)
Click: 'E' and then 'U' and then 'X' (the record is deleted without
warning)
It's only the CUSTOMER page that causes this problem. It has 3 different
grids of which at least 1 is always hidden. That is probably why this
problem arises.
Regards/Halsningar
Andre Colbiornsen
--------------------------------------
Sonnenburg Communications
Bergsgatan 3,
SE-211 54 Malmö
Sweden
Tel.: +46-(0)40-97 78 80
Fax.: +46-(0)40-97 78 80
Mob.: +46-(0)708-97 78 79
Mail:
Click here to reveal e-mail address
Web.: www.sonnenburg.se
--------------------------------------
B2B Web agency - Specializing on .Net
--------------------------------------
-----Ursprungligt meddelande-----
Från: Dennis West [mailto:
Click here to reveal e-mail address
]
Skickat: den 21 maj 2002 19:51
Till: aspngescalate
Ämne: [aspngescalate] Re: SV: Re: Confirm delete after Cancel in
Datagrid/EditColumn (NOT ANSW ERED AND DRIVING ME NUTS)
I don't see what you mean, I pressed delete and the car disapears, I get
a the confirm message and I tried all kinds of combinations and it
worked ...
I click delete button and then canceled the delete and it worked in all
combinations....
You will need to be very very very specfic in what steps i must do in
order to see the problem...
But it work fine here so far...sure like your store.
----- Original Message -----
From: "André Colbiörnsen" <
Click here to reveal e-mail address
>
To: "aspngescalate" <
Click here to reveal e-mail address
>
Sent: Tuesday, May 21, 2002 7:02 AM
Subject: [aspngescalate] SV: Re: Confirm delete after Cancel in
Datagrid/EditColumn (NOT ANSW ERED AND DRIVING ME NUTS)
Well Dennis,
This doesn't work. I loose the clientside OnCLick eventhandler e.g when
I have click the EDIT button and later pressed CANCEL. The record is
then deleted without warning.
Go here to see what I mean:
http://213.67.33.251/storeadmin
Login as:
Guest/guest
Choose:
'Customers/Customer Accounts' then Click 'Order'
Click: 'X' to delete (you get the confirmation dialogue)
Click: 'E' and then 'X' (you get the confirmation dialogue)
Click: 'E' and then 'C' and then 'X' (the record is deleted without
warning)
Click: 'E' and then 'U' and then 'X' (the record is deleted without
warning)
Somehow, the grids are not rebound (even if databind is called), which
is why the delete button does not get the clientside 'OnClick' attribute
added.
Regards/Halsningar
Andre Colbiornsen
--------------------------------------
Sonnenburg Communications
Bergsgatan 3,
SE-211 54 Malmö
Sweden
Tel.: +46-(0)40-97 78 80
Fax.: +46-(0)40-97 78 80
Mob.: +46-(0)708-97 78 79
Mail:
Click here to reveal e-mail address
Web.: www.sonnenburg.se
--------------------------------------
B2B Web agency - Specializing on .Net
--------------------------------------
-----Ursprungligt meddelande-----
Från: Dennis West [mailto:
Click here to reveal e-mail address
]
Skickat: den 21 maj 2002 17:05
Till: aspngescalate
Ämne: [aspngescalate] Re: Confirm delete after Cancel in
Datagrid/EditColumn (NOT ANSW ERED AND DRIVING ME NUTS)
Here is the only method I know of todate.
http://aspalliance.com/dotnetsolutions
/GetSolution.aspx?ID=12795" target="_blank">
http://aspalliance.com/dotnetsolutions
/GetSolution.aspx?ID=12795
over 2500 ASP.NET solutions at
http://aspalliance.com/dotnetsolutions
sign-up for daily updates
----- Original Message -----
From: "André Colbiörnsen" <
Click here to reveal e-mail address
>
To: "aspngescalate" <
Click here to reveal e-mail address
>
Sent: Tuesday, May 21, 2002 5:50 AM
Subject: [aspngescalate] Confirm delete after Cancel in
Datagrid/EditColumn (NOT ANSW ERED AND DRIVING ME NUTS)
I have had no answers to this at aspngdatagridrepeaterdatalist after
many attempts (and it has not appeared in the Escalate list either in
spite of me sending it there several days ago)!!!!!!!!!! so I am trying
again to escalate. I suspect it has something to do with viewstate.
ORIGINAL PROBLEM:
"I'm having a problem finding a way to add onClick=return confirm to a
button after having cancelled an update or updated. I have no problem
adding the attributes OnItemDataBound for item, alternating item and
edit item, but if I press the deletebutton after having updated the
record, the record is deleted without warning. Can anybody give me some
advice on this one?"
SCENARIO:
I have 3 datagrids in 1 web form 2 of the grids are hidden in an
invisible tablerow at pageload. When a button (orders) is clicked, the
first tablrow becomes invisible and the second visible. This tablerow
has 2 datagrids of which 1 is visible. If a linkbutton in this grid is
clicked, the third grid becomes visible. Now this is where my problems
arises. The datagrids are bound to 2 tables in a dataset "Products" and
"Orders". As I explain above, I have added the 'return confirm' to the
delete buttons in 2 of the datagrids on DataGrid_ItemDataBound, using:
"ListItemType.Item Or itemType =
ListItemType
.AlternatingItem Or
itemType =
ListItemType
.EditItem"
If I now try to delete an item I get the dialogue, as well as if I have
Edit activated. The rendered HTML looks like this:
'<input type="submit" name="dgrOrderDetails:_ctl2:btnDelOrder" value="X"
id="dgrOrderDetails__ctl2_btnDelOrder" class="btnStoreAdmin"
onclick="return confirm('Are you sure you want to delete this order:
180?');" />'
But after having clicked the cancel button (or the update button) the
rendered HTML now look like this:
'<input type="submit" name="dgrOrderDetails:_ctl2:btnDelOrder" value="X"
id="dgrOrderDetails__ctl2_btnDelOrder" class="btnStoreAdmin" />'
The onclick event is not there anymore!! And yes I rebind the data to
the grid. Is there anybody out there who can shed some light on this?
It's driving me nuts!!! ;P I might add that I only have this this
problem with this page carrying 3 different grids. On a page with only
one datagrid everything is hunky dory.
I have since worked with a scenario which dynamically creates buttons
OnItemDataBound. What happens now is that the buttons disappear (or
rather are not created) when I press 'Cancel' or 'Update'. For some
reason, the data is not rebound to my grids on 'Cancel' and 'Update'
even though I'm calling DataBind() on both events.
Regards/Hälsningar
André Colbiörnsen
================================
Sonnenburg Communications
Bergsgatan 3,
SE-211 54 Malmö
Sweden
Tel.: +46-(0)40-97 78 80
Fax.: +46-(0)40-97 78 80
Mob.: +46-(0)708-97 78 79
Mail:
Click here to reveal e-mail address
Web.: www.sonnenburg.se
================================
| [aspngescalate] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngescalate.asp
= JOIN/QUIT
| [aspngescalate] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngescalate.asp
= JOIN/QUIT
| [aspngescalate] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngescalate.asp
= JOIN/QUIT
| [aspngescalate] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngescalate.asp
= JOIN/QUIT
| [aspngescalate] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngescalate.asp
= JOIN/QUIT
Reply to this message...
System.Web.UI.WebControls.DataGrid
System.Web.UI.WebControls.ListItemType
System.Windows.Forms.DataGrid
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com