Last post Jan 15, 2019 06:05 AM by TW88
Jan 15, 2019 03:51 AM|TW88|LINK
there are some codes for all the gridviews when row created
How can i do to have some codes just for one of the Gridview in the same Sub? Thanks.
i tried "sender" or "e", seem not OK.
Private Sub GVPart_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GVPart.RowCreated, GVEvent.RowCreated, GVActivity.RowCreated
If e.Row.RowType = DataControlRowType.Header Then
do something for all here....
do something only for GVEvent.rowcreated here
Jan 15, 2019 04:48 AM|DA924|LINK
I would think that you could cast sender to a grid and check the name possibly, assuming that the event was a generic event method used by all grids..
dim thegrid = DirectCast(sender, gridview)
if thegrid.name = "Grid1" then
' do something
Jan 15, 2019 06:05 AM|TW88|LINK
Thanks a lot. It works.
finally i used thegrid.ID