Hello, I'm a Japanese. Sorry, I can speak a little English.
How to set combobox to cell of XamDataGrid. I saw exsample and news, Used XML resources. but i didn't find how to bind XamComboEditor from ViewModel's collection.
Now, I'm using ObjectDataProviderto to refer to article, but Iwant to use ViewModel collection. how to use it?
ComboBoxItemsProvider and ObjectDataProviderhttp://forums.infragistics.com/forums/p/9408/36631.aspx
Thanks.
<Window.Resources> <!--XamComboEditor Style--> <ObjectDataProvider x:Key="dataProvider" ObjectType="{x:Type local:VehicleTypes}" MethodName="Create" /> <Style x:Key="XamComboEditorStyle1" TargetType="{x:Type igEditors:XamComboEditor}"> <Setter Property="ItemsProvider"> <Setter.Value> <igEditors:ComboBoxItemsProvider ItemsSource="{Binding Source={StaticResource dataProvider}}" DisplayMemberPath="Summary" ValuePath="TypeId" /> </Setter.Value> </Setter> </Style></Window.Resources>
' ------------------------------------------' ViewModelOption Explicit OnOption Strict On
Imports System.Collections.ObjectModelImports Livet
Public Class VehicleSearchViewModel Inherits ViewModel
#Region "コンストラクタ"
Public Sub New() Me.Options = VehicleOptions.Create() Me.Types = VehicleTypes.Create() End Sub
#End Region
#Region "プロパティ"
#Region "Options変更通知プロパティ" Private _Options As IEnumerable(Of Object)
''' <summary> ''' オプションのコレクションを取得・設定します。 ''' </summary> Public Property Options() As IEnumerable(Of Object) Get Return _Options End Get Set(ByVal value As IEnumerable(Of Object)) _Options = value RaisePropertyChanged("Options") End Set End Property#End Region
#Region "Types変更通知プロパティ" Private _Types As IEnumerable(Of Object)
''' <summary> ''' 車種のコレクションを取得・設定します。 ''' </summary> Public Property Types() As IEnumerable(Of Object) <DebuggerStepThrough()> Get Return _Types End Get Set(ByVal value As IEnumerable(Of Object)) _Types = value RaisePropertyChanged("Types") End Set End Property#End Region
End Class
Hello,
I found this post duplicate to this one:
http://forums.infragistics.com/forums/p/65934/334799.aspx#334799
which is already discussed.