bertino12
asked on
Programmatically fire gridview SelectedIndexChanged event
How can I programmatically fire the gridview SelectedIndexChanged event? I have the row Index value.
The function I am using is called PopGridView() and has no parameters.
Thanks,
The function I am using is called PopGridView() and has no parameters.
Thanks,
ASKER
Sorry, I should have said I need this to happen client side
I have a clientside function called PopGridView() and I need to fire the selectedIndexChanged event inside of it. I have the row index already.
Private Sub PopGridView(byval RowIndex as integer)
'Fire the SelectedIndexChanged Event with RowIndex
End Sub
I have a clientside function called PopGridView() and I need to fire the selectedIndexChanged event inside of it. I have the row index already.
Private Sub PopGridView(byval RowIndex as integer)
'Fire the SelectedIndexChanged Event with RowIndex
End Sub
ASKER
I just got it working by changing the SelectedIndexChanged parameters to optional, then just calling the function itself. I dont know if this is a bad thing, but it seems to work fine.
Private Sub gvSchedule_SelectedIndexCh anged(Opti onal ByVal sender As Object = Nothing, Optional ByVal e As System.EventArgs = Nothing) Handles gvSchedule.SelectedIndexCh anged
'Do some things.
End Sub
Private Sub PopGridView()
gv_SelectedIndexChanged()
End Sub
Private Sub gvSchedule_SelectedIndexCh
'Do some things.
End Sub
Private Sub PopGridView()
gv_SelectedIndexChanged()
End Sub
This will work just fine.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.netomatix.com/development/gridviewrowselectedevent.aspx
Hope this helps