473,325 Members | 2,342 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,325 software developers and data experts.

Javascript Confirmation Dialog for Datagrid Select?

I am using a datagrid with a SELECT button to determine which record to
delete. The code behind pulls the selected item's record number (via a
hidden column) in the grid with SelectedItem.Cells[x].Text, and then
uses a stored procedure to delete the record.

I need to wire up a javascript confirmation dialog (Are you sure you
want to delete this record? Yes/No) to it. Any suggestions on how to do
this?

Nov 19 '05 #1
1 1915
Joey,

Use the ItemDataBound event of the grid.

I have sample code at: http://www.aboutfortunate.com?page=codelibrary that
makes a row clickable. To do that I'm adding a javascript to the row and
hiding the Select Button column. But with a few little tweaks you could use
the code to still show the select button, grab it and add your javascript
confirm to it. To find the code use the search text box on the page and type
"clickable datagrid".

If you have any questions feel free to email me.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Joey" <jo*********@topscene.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
I am using a datagrid with a SELECT button to determine which record to
delete. The code behind pulls the selected item's record number (via a
hidden column) in the grid with SelectedItem.Cells[x].Text, and then
uses a stored procedure to delete the record.

I need to wire up a javascript confirmation dialog (Are you sure you
want to delete this record? Yes/No) to it. Any suggestions on how to do
this?

Nov 19 '05 #2

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

Similar topics

6
by: Shaun Fleming | last post by:
I've been trying to make this simple script compatible across various browsers. It works for IE 6.0 and NS 7 but doesnt work with Opera (I have version 7.11). This is what is supposed to happen:...
2
by: john | last post by:
I posted this question to comp.lang.javascript but didn't get a response, so I'll try here. I am using ASP.NET and I have a datagrid. One of the columns in my grid is all checkboxes. When the...
1
by: Mphoza | last post by:
Hi! Programmers,,,,,, Scenario I have a DataGrid with the delete button, If the user delete the row I'd like to show a confirmation dialog box with two buttons(Yes,No). If the user click yes...
3
by: Dave | last post by:
How can I add the confirmation dialog on record delete to the "Delete" command column in DataGrid control?
3
by: vcornjamb | last post by:
Hello, I am developing a web form that contains some buttons and a data grid which has as its last column link buttons that will delete the data associated with that row. Everything works fine,...
6
by: JenHu | last post by:
Hi experts, I want to add a delete button in my datagrid, and before it deletes from database, I want to have a confirm dialog box for this deletion. I am entry level to the vb.net, and don't...
6
by: tshad | last post by:
I am trying to set up a Javascript popup box that has a way of sending back a message to asp.net on how to process some data. At the moment I am just doing: ...
4
by: phil | last post by:
Is there an elegant way that I can return a value from a JavaScript function to ASP.NET? I want to have a popup confirmation dialog using JavaScript and only have a button control execute its ASP...
5
by: Tomislav | last post by:
Hello, I tried to use "javascript:return confirm();" function in following manner ( triggered by form onSubmit event ): ** <form method="post" action="mail.php" onSubmit="javascript:return...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.