Hi I have a problem with a custom cell of a gridview, I'm using a PopupEditor I associate one popupcontainer controls but this when launching the event EditorRequired out empty someone could help me I would appreciate it very much add the code of the custom editor class
Public Class PopUpEditor
Inherits BaseGridEditor
Public Overrides Property Value () As Object
Get
As editor Dim Telerik.WinControls.UI.RadPopupEditorElement = CType (Me.EditorElement, Telerik.WinControls.UI.RadPopupEditorElement)
Return editor.Value
End Get
Set (ByVal value As Object)
As editor Dim Telerik.WinControls.UI.RadPopupEditorElement = CType (Me.EditorElement, Telerik.WinControls.UI.RadPopupEditorElement)
If value AndAlso value isnot isnot Nothing Then DBNull.Value
If Not IsNumeric (editor.Value) Then
editor.Value = Convert.ToInt32 (value)
End If
else
editor.Value = 0
End If
End Set
End Property
Public Overrides Sub BeginEdit ()
MyBase.BeginEdit ()
Me.EditorElement.Focus ()
'AddHandler (CType (EditorElement, TrackBarEditorElement)). TrackPositionChanged, AddressOf TrackBarEditor_TrackPositionChanged
End Sub
Public Overrides Function EndEdit () As Boolean
'RemoveHandler (CType (EditorElement, TrackBarEditorElement)). TrackPositionChanged, AddressOf TrackBarEditor_TrackPositionChanged
Return MyBase.EndEdit ()
End Function
'Private Sub TrackBarEditor_TrackPositionChanged (ByVal sender As Object, ByVal e As EventArgs)
'OnValueChanged ()
'End Sub
Protected Overrides Function CreateEditorElement () As Telerik.WinControls.RadElement
CPOP Dim As New Telerik.WinControls.UI.RadPopupEditor
Dim text As New Telerik.WinControls.UI.RadTextBoxControl
Dim container As New Telerik.WinControls.UI.RadPopupContainer
contenedor.PanelContainer.Controls.Add (text)
texto.Dock = DockStyle.Fill
texto.Text = "Hello"
cpop.Name = "EditorPopUp"
cpop.AssociatedControl = container
Return cpop.PopupEditorElement 'Telerik.WinControls.UI.RadPopupEditorElement
End Function
End Class
Public Class PopUpEditor
Inherits BaseGridEditor
Public Overrides Property Value () As Object
Get
As editor Dim Telerik.WinControls.UI.RadPopupEditorElement = CType (Me.EditorElement, Telerik.WinControls.UI.RadPopupEditorElement)
Return editor.Value
End Get
Set (ByVal value As Object)
As editor Dim Telerik.WinControls.UI.RadPopupEditorElement = CType (Me.EditorElement, Telerik.WinControls.UI.RadPopupEditorElement)
If value AndAlso value isnot isnot Nothing Then DBNull.Value
If Not IsNumeric (editor.Value) Then
editor.Value = Convert.ToInt32 (value)
End If
else
editor.Value = 0
End If
End Set
End Property
Public Overrides Sub BeginEdit ()
MyBase.BeginEdit ()
Me.EditorElement.Focus ()
'AddHandler (CType (EditorElement, TrackBarEditorElement)). TrackPositionChanged, AddressOf TrackBarEditor_TrackPositionChanged
End Sub
Public Overrides Function EndEdit () As Boolean
'RemoveHandler (CType (EditorElement, TrackBarEditorElement)). TrackPositionChanged, AddressOf TrackBarEditor_TrackPositionChanged
Return MyBase.EndEdit ()
End Function
'Private Sub TrackBarEditor_TrackPositionChanged (ByVal sender As Object, ByVal e As EventArgs)
'OnValueChanged ()
'End Sub
Protected Overrides Function CreateEditorElement () As Telerik.WinControls.RadElement
CPOP Dim As New Telerik.WinControls.UI.RadPopupEditor
Dim text As New Telerik.WinControls.UI.RadTextBoxControl
Dim container As New Telerik.WinControls.UI.RadPopupContainer
contenedor.PanelContainer.Controls.Add (text)
texto.Dock = DockStyle.Fill
texto.Text = "Hello"
cpop.Name = "EditorPopUp"
cpop.AssociatedControl = container
Return cpop.PopupEditorElement 'Telerik.WinControls.UI.RadPopupEditorElement
End Function
End Class