Custom Cell

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    6 posts
    Member since:
    Nov 2010

    Posted 23 Apr Link to this post

    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
  2. Daniel
    Daniel avatar
    6 posts
    Member since:
    Nov 2010

    Posted 23 Apr in reply to Daniel Link to this post

    sorry bad copy the last procedure is so

    Protected Overrides Function CreateEditorElement () As Telerik.WinControls.RadElement
           Dim CPOP As New Telerik.WinControls.UI.RadPopupEditor
           Dim text As New Telerik.WinControls.UI.RadTextBoxControl
           Dim contenedor 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

  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top