Solved

How to generate events in c#

Posted on 2013-01-30
5
385 Views
Last Modified: 2013-01-31
This is definitely a beginner question, but I was hoping someone could explain this to me since i'm used to working with VB.  In VB viewing the different events for a page or a user control is easy to do.  You can select the control in the top left rectangle of the IDE and see a list of its associated events in the top right rectangle of the IDE.

In c# you can't do that.  You also can't see a list of events associated with it in the properties window as far as I can tell.  If you double click the control in designer mode you will generate the method signature for its default event but nothing else.

I am trying to make the RowCreated event for a grid view in C#.  Is there a way to generate a method signature for this event?
0
Comment
Question by:kpbarem
5 Comments
 
LVL 42

Assisted Solution

by:sedgwick
sedgwick earned 333 total points
ID: 38835703
0
 
LVL 42

Assisted Solution

by:sedgwick
sedgwick earned 333 total points
ID: 38835710
Add the event handler function in your class and also u need to add the event property inside the <asp:gridview> in your aspx page
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 38835786
Select the GridView.  Now hit the "Lightning Bolt" icon in the Properties Pane to see a list of events for it.  Scroll down to the "RowCreated" entry and double click to the right.
0
 
LVL 1

Accepted Solution

by:
jinsonaf earned 167 total points
ID: 38838744
Hi

Check this link. This says about  the rowcreated event of gridview

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowcreated.aspx
0
 

Author Closing Comment

by:kpbarem
ID: 38841656
Thanks everyone for your help.  Unfortunatley the lightning bolt method is one that I attempted before and I couldn't seem to get it to work.  But thanks!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Checkbox in a dynamic GridVIew is not clickable? 5 25
VB.Net Report Printing Issue 3 31
Help with error when uploading excel file 3 26
Regular expression help 2 22
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 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

10 Experts available now in Live!

Get 1:1 Help Now