Which control should I use in WPF browser application to get multi column Combo Box?
Thanks
Shivangi
Hello Petar,Thank you for the response.When I tried to use your suggested code my application throws following error at <DataTemplate>:
"System.Windows.Markup.XamlParseException was unhandledMessage: Cannot create instance of 'Page1' defined in assembly 'TestApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation. Error in markup file 'Page1.xaml' Line 1 Position 7."
Here is my code:
<StackPanel Margin="261,10,50,43" MinWidth="0" Orientation="Vertical" Opacity="1" Grid.ColumnSpan="1" Grid.RowSpan="1" CanHorizontallyScroll="True" CanVerticallyScroll="True" VerticalAlignment="Stretch">
<igEditors:XamDateTimeEditor Height="35" Name="dtFromDate" Width="255" Padding="10" Margin="2" FontSize="9" AutoFillDate="MonthAndYear" FontWeight="Bold" AlwaysValidate="True" />
<igEditors:XamDateTimeEditor Height="35" Name="dtToDate" Width="255" Padding="10" Margin="2" FontSize="9" FontWeight="Bold" AlwaysValidate="True" AutoFillDate="MonthAndYear"></igEditors:XamDateTimeEditor>
<igEditors:XamComboEditor Height="35" Name="ceEmployeeName" Width="253" Margin="2" FontSize="9" FontWeight="Bold"> <igEditors:XamComboEditor.ComboBoxStyle> <Style TargetType="ComboBox"> <Setter Property="ItemTemplate"> <Setter.Value> <DataTemplate> <StackPanel Orientation="Horizontal" Background="Yellow"> <TextBox Width="60" Margin="1"/> <TextBox Width="60" Margin="1"/> <TextBox Width="60" Margin="1"/> </StackPanel> </DataTemplate> </Setter.Value> </Setter> </Style> </igEditors:XamComboEditor.ComboBoxStyle> </igEditors:XamComboEditor>
</StackPanel>
ThanksShivangi
Hello Shivangi,
I have been looking into your enquiry and since there is no such built-in functionality I can suggest you start off with the XamComboEditor and use its ComboBoxStyle property to set a style that can retemplate your items to your liking. Here is a sample xaml snippet you can check out:
<igEditors:XamComboEditor … >
<igEditors:XamComboEditor.ComboBoxStyle>
<Style TargetType="ComboBox">
<Setter Property="ItemTemplate" >
<Setter.Value>
<DataTemplate >
<StackPanel Orientation="Horizontal" Background="YellowGreen" >
<TextBox Width="60" Margin="1" />
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</igEditors:XamComboEditor.ComboBoxStyle>
</igEditors:XamComboEditor>
Hope this helps. Please let me know if you require any further assistance or clarification on the matter.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support