Radcombobox not updating

19-Apr-2015 05:51

Public Class My List Object Private _mylist As New Observable Collection(Of String) Private _selected Name As String Public Sub New(By Val name List As List(Of String), By Val default Name As String) For Each name In name List _mylist. Add("Tim") obj2 = New My List Object(namelist2, "Tim") odp = Direct Cast(Me. Solution: So, try to set Selected Index using Selected Value via Converter like this: C# code //Converter public class Selected To Index Converter : IValue Converter { public object Convert(object value, Type target Type, object parameter, Culture Info culture) { if (value ! It seems like Content would be a sensible default for Selected Value but perhaps it isn't? Add(name) Next _selected Name = default Name End Sub Public Read Only Property My List() As Observable Collection(Of String) Get Return _mylist End Get End Property Public Read Only Property Selected Name() As String Get Return _selected Name End Get End Property End Class Class Window1 Private obj1 As My List Object Private obj2 As My List Object Private odp As Object Data Provider Public Sub New() Initialize Component() Dim namelist1 As New List(Of String) namelist1. Add("Steve") obj1 = New My List Object(namelist1, "Steve") . Find Resource("My List Object"), Object Data Provider) odp. = null && value is Your Type) { Your Type Your Selected Value = (Your Type) value; Your Selected Value = (Your Type) cmb Downtime Dictionary. The Binding Mode needs to be One Way To Source or Two Way since the source is what you want updated. Object Instance = obj1 End Sub Private Sub btn_List1_Click(By Val sender As System. Mode One Way is Source to Target and therefore makes the Source Read Only which results in never updating the Source. I've been fighting with this issue for hours today, and you know what I found out? The list that was populating the Combo Box was Int64, and I was trying to store the value in an Int32 field! i assume that Data Context="{Binding Relative Source={Relative Source Self}, Path=.}" is execute when calling Initialize Component(); and because your List String property is just an autoproperty and not implement INotify Property Changed - your mainwindowview does not get notified that your ctor creates a new List String property.I came to know that this is happening because of, when Initialize Component is called it binds that control to that particular object reference AND when reference is changed itself then it doesn't work.your combobox will never "create a new itemssource" for your viewmodel.

[Web Method] public static Rad Combo Box Data Get Company Names(Rad Combo Box Context context) { Data Table data = Get Data(context. Text); Rad Combo Box Data combo Data = new Rad Combo Box Data(); int item Offset = context.