0

Hi guys,

i am facing a problem which is i need to create a dynamic gridview control and i need to add eventhandler for this gridview. Therefore, how i add the event?

4
Contributors
3
Replies
5
Views
8 Years
Discussion Span
Last Post by Nada_ward
0

are you creating that gridview at runtime?
then your could add a global declaration: Private withevents dataGV as datagridview after this you can already find the events for that control just as all others.
and use it on runtime like: dataGV = new gridview

0

use add handler

ex:

addhandler gridview.click , addressof event

sub event(ByVal sender As System.Object, ByVal e As System.EventArgs)

msgbox("OK")

end sub

suppose the event you want when gridview clicked
and what you want to do put it in another sub

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.