?
Solved

ASP.NET - Event for ItemTemplate Textbox?

Posted on 2003-11-21
3
Medium Priority
?
533 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 500 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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.   …
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

777 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