Hi,
Is there some way to add static values in a xamWebComboBox as we can add static/fixed items in native combobox as following:
<ComboBox Name="ddlTimeRange" Grid.Column="1" Grid.Row="1" > <ComboBoxItem Content="1 month" Tag="1" /> <ComboBoxItem Content="3 months" Tag="3" /> <ComboBoxItem Content="6 months" Tag="6" /> <ComboBoxItem Content="1 year" Tag="12" /> <ComboBoxItem Content="2 years" Tag="24" IsSelected="True" /> <ComboBoxItem Content="5 years" Tag="60" /> <ComboBoxItem Content="10 years" Tag="120" /> </ComboBox>
so what will be the syntax for the following:
<ig:XamComboEditor Name="ddlFicalYear"> <ig:XamComboEditor.Items> </ig:XamComboEditor.Items></ig:XamComboEditor>
Thanks
Hello Imran Javed Zia,
For databinding in the xamComboEditor I have attached a sample for this. Within the control you can set the DisplayMemberPath property after ItemsSource.
Let me know if you have any questions with this matter. Thank you.
Hi Duane,
It is showning a good example to bind static data to combobox with help of custom object class list, but we arenot interested to create objects just for a single drop down, as we may have dozen of different dropdowns with static data and we want some simple way available in default combobox.
Any how, thanks for the sample and I am ending this thread with Darrell's comments that there is no direct way to initialize XAMComboEditor in XAML only without any code behind.