Solved

ASP.NET - Event for ItemTemplate Textbox?

Posted on 2003-11-21
3
532 Views
Last Modified: 2011-04-14
Hello,

I have a datagrid (with paging, 15/page) with a column made up of textboxes (itemTemplate).  Since there is only one column that's editable, I allow end-users to update the data in this column then save the data by clicking a [save] button, which loops through and saves the data.   However, since my grid has paging, I would like to  check if there were any updates made to this column and prompt the user to save or not before allowing the page change.  How do I capture the event of the textchange of the text box (itemtemplate) in this column?  Is it possible or do I need to try another approach altogether?  Thanks.
0
Comment
Question by:ocean9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 12

Accepted Solution

by:
roverm earned 125 total points
ID: 9802352
You can solve this 2 ways:
1. Store each row immediatly after editing (using an Update button)
2. Use some javascript to ask the user what to do. In this case you need to capture all onclick events for the paging button, like this:
btNextPage.Attributes("onclick") = "return confirm('Save first?');"
Of course, this is just the general idea. Preferably you would like to check whether an update is done first before showing the confirm box.

Let me know.

D'Mzz!
RoverM
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10277121
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: roverm {http:#9802352}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0

Featured Post

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

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

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

695 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