In SL4 DataGrid I have the following multicontrol column:
<sdk:DataGridTemplateColumn Header="Address Line1
Address Line 2" MinWidth="200">
<sdk:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Path=Address1}"/>
<TextBlock Text="{Binding Path=Address2}"/>
</StackPanel>
</DataTemplate>
</sdk:DataGridTemplateColumn.CellTemplate>
<sdk:DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<StackPanel>
<TextBox Background="Transparent" BorderThickness="0"
TabIndex="0"
Text="{Binding Path=Address1, Mode=TwoWay}"/>
<TextBox Background="Transparent" BorderThickness="0"
TabIndex="1"
Text="{Binding Path=Address2, Mode=TwoWay}"/>
</StackPanel>
</DataTemplate>
</sdk:DataGridTemplateColumn.CellEditingTemplate>
</sdk:DataGridTemplateColumn>
In edit mode pressing Tab key while at address1 moves focus to next DataGrid column but not to address2 textbox. If I delete CellTemplate and CellEditingTemplate to be CellTemplate instead, then TabIndex works as expected, however, current column stay the same, so if datagrid has many columns, some of which are hidden, then auto scrolling doesn't occur. What should I do to solve this problem?