Solved

ASP.NET - Event for ItemTemplate Textbox?

Posted on 2003-11-21
3
522 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
3 Comments
 
LVL 12

Accepted Solution

by:
roverm earned 125 total points
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now