473,608 Members | 2,410 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Handling Events from Data Grid

I'm working on a Data Grid app. For a number of reasons (mostly aesthetic) I don't want to use the standard approach with Button Columns for doing updates on a row-by-row basis. I know I can create Template Columns that contain Web Controls. I want to handle postback events (TextChanges on a TextBox, for example) on Web Controls contained in a Template Column. Does anybody know of a way to write "AddHandler s" for those

Sample code, maybe?

Thanks in advance for any help

Nov 18 '05 #1
1 1121
Hi,

you can still write event handler declaratively (in aspx) even if control is
contained in a template. Second way is to locate controls in DataGrid's
ItemCreated event and wire the event handler there (by seraching the control
from DataGridItem and then assigning the event handler)

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke

"Rich" <an*******@disc ussions.microso ft.com> wrote in message
news:19******** *************** ***********@mic rosoft.com...
I'm working on a Data Grid app. For a number of reasons (mostly aesthetic) I don't want to use the standard approach with Button Columns for
doing updates on a row-by-row basis. I know I can create Template Columns
that contain Web Controls. I want to handle postback events (TextChanges on
a TextBox, for example) on Web Controls contained in a Template Column.
Does anybody know of a way to write "AddHandler s" for those?
Sample code, maybe??

Thanks in advance for any help.

Nov 18 '05 #2

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

Similar topics

1
2100
by: Peter Rilling | last post by:
I have an interesting problem with a datagrid. It is the standard chicken-and-the-egg problem. I have this page with two datagrids. It essentially defines a parent-child relationship. The parent grid has a "edit" and "delete" columns. When the "edit" link button is clicked, I want the child grid to display some information related to the parent. Now the child grid also has some command buttons. My problem is that I cannot get the...
1
2684
by: Gunjan Garg | last post by:
Hello All, I am working to create a generic datagrid which accepts a datasource(ListData - This is our own datatype) and depending on the calling program customizes itself for sorting, paginantion or accepting the add and remove item events. What i am observing is that none of the vents are happening... (Sort, page, or item). I am sure I am missing something basic here... Need help... Thanks much
0
2224
by: BigAl.NZ | last post by:
Hi Guys, I am trying to write/copy some code that uses events with a GPS. Everytime the GPS position updates the event fires. The GPS code is from a SDK Library that I got called GPS Tools from www.franson.com For some reason my code below doesnt work - the GpsFixEvent never seems to "fire" as it were.
5
4705
by: =?Utf-8?B?TWFyYyBXb29sZnNvbg==?= | last post by:
Hi, I have a strange issue occurring with LinkButtons that are dynamically added to each (data) row of my DataGrid on that grid's ItemDataBound event. Each LinkButton is assigned its own event handler to deal with the Command event, but for some reason I can get this to work in a C# project but not in a newly created VB.NET one. The relevant VB.NET is as follows:
0
8010
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8501
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
6820
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6015
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5479
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3967
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4030
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1607
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1336
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.