Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional popup window after datagrid update command

Status
Not open for further replies.

clanm

Programmer
Dec 26, 2005
237
US
What I'm trying to do is mimic an Access version of our web application, and not too sure where to start. Here's my scenario:

1. When a user edit's a row in a datagrid and clicks "Update", I have to see if the textbox value that's being edited exists or not in a table. Let's say it's an Order ID, and if the user edits a datagrid row, then clicks "Update", and the ID entered in the textbox doesn't yet exist in the "Orders table", then I have to prompt the user if they'd like to add a description along with this new ID.

2. If they click yes, take them to another screen to add the description and other information, or if they click no, simply close the new window.

We've done javascript in our code for a dropdownlist selectindexchange event (attributes.add), but I'm not sure how to make the code behind conditionally show a popup window.

Any suggestions are welcome! thanks!
 
I would change the logic that you propose. You should have an autoincrement column that creates the ID for you. You should not let the user create or edit the ID for sake of data integity. For the insert of a new row, you can add a template for the footer row to allow data entry.

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top