Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
ComboBox in XamWebGrid DataTemplate
posted

 

Project Background

 

  • Silverlight Navigation Application
  • WCF
  • ADO.NET Entity Data Model
  • Domain Service Class

 

Facts About Project

 

  • Grid Binding is working fine
  • I have avoided any binding in grid from xmal instead have them in LoadData Function as seen in example below 
  • I have already went throw many infragistic examples
  • most of them have source as static resource similar to Infragistics Local Samples

 

Question

 

  • How to use ComboBox in XamWebGrid
  • it should have biding behind code similar to binding of < IngredientTypeComboEditor > in example below
  • Should not use Static Resource

 

XAML CODE:

 

 <igCombo:XamWebComboEditor Name="IngredientTypeComboEditor"  />

<igGrid:XamWebGrid Name="grdList">

 

            <igGrid:XamWebGrid.Columns>

                <igGrid:TextColumn Key="Code" HeaderText="Code" Width="Auto" MinimumWidth="20" />

                <igGrid:TextColumn Key="TitleAR" HeaderText="Name Arabic" Width="Auto" MinimumWidth="150" />

                <igGrid:TextColumn Key="TitleEN" HeaderText="Name English" Width="Auto" MinimumWidth="150" />

                <igGrid:TemplateColumn.ItemTemplate>

                        <DataTemplate>

                             <TextBlock Text="{Binding Path=???, Source={???}}" />                        </DataTemplate>

                    </igGrid:TemplateColumn.ItemTemplate>

 

                     <igGrid:TemplateColumn.EditorTemplate>

                        <DataTemplate>

                            <ComboBox Name="ComboIngredientType" ItemsSource="{Binding ???}" />

                        </DataTemplate>

                </igGrid:TemplateColumn.EditorTemplate> 

            </igGrid:TemplateColumn>

</igGrid:XamWebGrid>

VB CODE:

Dim SRV As New DomainService1

Private Sub LoadData()

Me.grdList.ItemsSource = SRV.Ingredients

        Me.grdList.ItemsSource = SRV.Ingredients

        SRV.Load(SRV.GetIngredientsQuery)

        Me.IngredientTypeComboEditor.ItemsSource = SRV.D_IngredientTypes

        Me.IngredientTypeComboEditor.DisplayMemberPath = "TitleEN"

        SRV.Load(SRV.GetD_IngredientTypeQuery)

End Sub

 

Parents Reply Children