General information
Category:
Coding, syntax and commands
You may be able to use reflection.
One example here :http://stackoverflow.com/questions/198543/how-do-i-raise-an-event-via-reflection-in-net-c
>Hi Peter . Thanks for your reply.
>The event I am looking at has come from a third party, so I dont have direct access to the code as it is somewhere up the hierarchy of classes but I want to 'simulate' what happens when the RowEnter say is triggered .
>
>Regards,
>Gerard
>
>
>
>>>Is it possible to run event code from elsewhere in .net(C#)
>>>
>>>Say I have a Datagridview with code in the RowEnter event , and I want to run the code thats in the RowEnter event from another place on the form say a button on the form . How would I do this ?
>>>
>>>Tia
>>>Gerard
>>
>>Put the event code in a separate method and you can call it from where you like
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only