AddHandler statement

B

bbernieb

I created a DataGrid dynamically using a PlaceHolder; to sort the DataGrid I
used the AddHandler statement ( AddHandler myDataGrid.SortCommand, AddressOf
myEventHandler). It didn't work. The code never reached "myEventHandler"
So, I tried using the AddHandler statement on a DataGrid that wasn't created
dynamically. It did work. What could I be missing?
 
B

bbernieb

Thanks!! It works.
Sonu Kapoor said:
You need to add the handler in the Init. Where are you adding it?

--
Sonu Kapoor - [MCP]
ASP.NET Moderator
WebSite: http://www.Kapoorsolutions.com
Blog: http://www.Kapoorsolutions.com/blog/
ASP.NET News: http://www.Kapoorsolutions.com/reblogger/


bbernieb said:
I created a DataGrid dynamically using a PlaceHolder; to sort the DataGrid I
used the AddHandler statement ( AddHandler myDataGrid.SortCommand, AddressOf
myEventHandler). It didn't work. The code never reached "myEventHandler"
So, I tried using the AddHandler statement on a DataGrid that wasn't created
dynamically. It did work. What could I be missing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top