By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,016 Members | 2,297 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,016 IT Pros & Developers. It's quick & easy.

Handling Events from Data Grid

P: n/a
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 "AddHandlers" for those

Sample code, maybe?

Thanks in advance for any help

Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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*******@discussions.microsoft.com> wrote in message
news:19**********************************@microsof t.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 "AddHandlers" for those?
Sample code, maybe??

Thanks in advance for any help.

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.