Last Updated: 20 Oct 2016 10:44 by ADMIN
Dess | Tech Support Engineer, Principal
Created on: 08 Aug 2016 11:55
Type: Bug Report
FIX. RadDataEntry - the value in a RadDropDownList is not stored when navigating to the next/previous item
Please refer to the attached gif file.

Workaround: handle the SelectedIndexChanged event and update the DataBoundItem programmatically:

Dim dt As New DataTable
Dim bs As New BindingSource
Sub New()

    AddHandler Me.RadDataEntry1.EditorInitializing, AddressOf EditorInitializing

    dt.Columns.Add("Id", GetType(Integer))
    dt.Columns.Add("Name", GetType(String))
    dt.Columns.Add("Type", GetType(DeliveryType))

    dt.Rows.Add(1, "Item1", DeliveryType.Type2)
    dt.Rows.Add(2, "Item2", DeliveryType.Type3)
    dt.Rows.Add(3, "Item3", DeliveryType.Type1)

    bs.DataSource = dt
    Me.RadDataEntry1.DataSource = bs
    Me.RadBindingNavigator1.BindingSource = bs
End Sub

Public Enum DeliveryType
    Type1 = 0
    Type2 = 1
    Type3 = 2
End Enum

Private Sub EditorInitializing(sender As Object, e As Telerik.WinControls.UI.EditorInitializingEventArgs)
    Dim ddl As RadDropDownList = TryCast(e.Editor, RadDropDownList)
    If ddl IsNot Nothing Then
        AddHandler ddl.SelectedIndexChanged, AddressOf SelectedIndexChanged
    End If
End Sub

Private Sub SelectedIndexChanged(sender As Object, e As Data.PositionChangedEventArgs)
    Dim dataRowView As DataRowView = TryCast(bs.Current, DataRowView)
    dataRowView.Row("Type") = e.Position
End Sub
Attached Files: