DataGrid events

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

I am using vs 2008 and am confused as to what the sender is in DataGrid
events.

You use DataGridItemEventsArgs:

Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)

So I thought I had a DataGridItem as my object.

But apparently that is not the case.

Is the object of all the DataGrid events a DataGrid and the events always
DataGridItemEventArgs?

Thanks,

Tom
 
Is the object of all the DataGrid events a DataGrid and the events always
DataGridItemEventArgs?

The eventargs will vary depending on the particular event, but yes, the
sender will always be the DataGrid as long as the event was intiated from
the grid itself (and not, for example, a second datagrid).
 
Back
Top