Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inherited DataGrid - Define new events?
Message
De
24/05/2006 12:57:37
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Inherited DataGrid - Define new events?
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP
Divers
Thread ID:
01124580
Message ID:
01124580
Vues:
55
I have been struggling a bit with a Custom Control based on the DataGrid. I want to define new events in the class that will be handled by the container (web page/user control). The event declaration compiles fine but I don't see the event listed with the control in the code editor - I see all of the inherited DataGrid events, but not the one I created. The AutomatedDataGrid type does not expose the event through intellisense. I can see the public properties and methods fine, but not the events.

Is there a trick to creating events in a derived datagrid control?
' Web Page:
Public Class DailyWorkEntry
	Inherits HurricaneDataPage
	Implements IHurricaneDataPage
'...
	Protected WithEvents dgDailyWorkDetail As DataControls.AutomatedDataGrid

End Class

' Custom Control:
Public Class AutomatedDataGridEventArgs
	Inherits System.EventArgs

	Public NewRow As DataRow

	Sub New()
	End Sub

	Sub New(ByVal NewRow As DataRow)
		Me.NewRow = NewRow
	End Sub
End Class

Public Class AutomatedDataGrid
	Inherits System.Web.UI.WebControls.DataGrid

	Delegate Sub GridEventHandler(ByVal sender As Object, ByVal e As AutomatedDataGridEventArgs)
	Public Event NewLineCreated As GridEventHandler
End Class
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform