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
525
MS AutoCompleteBox in EditorTemplate
posted

Hi,

I use a regular ComboBox in an EditorTemplate without any problems. If I select something from the list, my dataobject is updated. Adding a new row also happens without problems.

I have a scenario where my EditorTemplate contains a MS AutoCompleteBox where the user searchs for a name in Active Directory. This works fine. The names are displayed in the AutoCompleteBox and I can select one from the list.

However:

When editing existing records, If I select a new name from the autocompletebox the new text from the selections is displayed. However, when I leave the Cell, the data is not updated.

If I add a new row when using a AutoCompleteBox as part of it, nothing happens. See attached four screenshots to illustrate the problem.

This is my XAML Code:

<igGrid:TemplateColumn x:Name="colExecutor" HeaderText="Executor" IsFixed="Left" Key="executorFullName" >
            <igGrid:TemplateColumn.ItemTemplate>
              <DataTemplate>
                <TextBlock Text="{Binding executorFullName}" />
              </DataTemplate>
            </igGrid:TemplateColumn.ItemTemplate>
           <igGrid:TemplateColumn.EditorTemplate>
              <DataTemplate>
                 <input:AutoCompleteBox Populating="txtbExecutor_Populating" MinimumPopulateDelay="200" x:Name="txtbExecutor" Margin="6,2,0,2"
         ItemTemplate="{StaticResource showCN}" ValueMemberPath="cn" IsTextCompletionEnabled="False" />
              </DataTemplate>
     </igGrid:TemplateColumn.EditorTemplate>
     </igGrid:TemplateColumn>

Any help would be appreciated,
Nicolas

Parents
No Data
Reply
  • 6475
    Verified Answer
    posted

    Hi Nicolas,

    I can't see any binding there that would update your DataSource.

    You should add such binding:

    <igGrid:TemplateColumn.EditorTemplate>

    <DataTemplate>

    <input:AutoCompleteBox Populating="txtbExecutor_Populating"

     MinimumPopulateDelay="200"

    x:Name="txtbExecutor"

    Margin="6,2,0,2"

    ItemTemplate="{StaticResource showCN}"

    ValueMemberPath="cn"

    IsTextCompletionEnabled="False"

    Text={Binding executorFullName, Mode=TwoWay}"/>

    </DataTemplate>

    </igGrid:TemplateColumn.EditorTemplate>

Children