Hi everybody,
I added button object to datagird object, it apears on datagrid at run time properly.
How can i create event for it??
ex:
button.click!!
ur help will be appreciated!!!
Printable View
Hi everybody,
I added button object to datagird object, it apears on datagrid at run time properly.
How can i create event for it??
ex:
button.click!!
ur help will be appreciated!!!
I don't have any code to give you, but the .Net help files has a pretty good description. Look up AddHandler Keyword in the Help file and pick the topic - Writing Event Handlers. Looks pretty straightforward.
Another way to understand the addhandler is to put a button on the form, double click it, then go to the code that is created for you by the IDE, it will show you how to create a handler for a button.
I was trying to work something out and realized that VB.NET handles events way differently than C#. I'll have to refer to my VB.NET book.
This should be done through WithEvents and AddHandler methods . Check out this example I've posted some time ago (very easy to understand). Just apply the same idea to what you are trying to do .