Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

WPF DataGrid TemplateColumn does not go into edit mode when tabbed to first time.

$
0
0
I am using a TemplateColumn with the .Net4.0 DataGrid.  When I tab thru the other columns when in edit mode the cells go right into edit mode, but when I hit the cell with the TemplateColumn I have to click the tab twice to get into edit mode.

 

 

 

Any Workarounds. I came across a work around http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/93d66047-1469-4bed-8fc8-fa5f9bdd2166/ but I cannot use that because of the bug http://social.msdn.microsoft.com/forums/en-US/wpf/thread/ce04cc94-ef72-4eef-9e5e-56a9eb3bce66. I'm not able to set the name of the editable textbox to enclose it within a grid. Any other sugestions?

<tkit:DataGridTemplateColumn>
  <tkit:DataGridTemplateColumn.HeaderTemplate
>
    <DataTemplate
>
      <TextBlock Text
="Job Title"/>
    </DataTemplate
>
  </tkit:DataGridTemplateColumn.HeaderTemplate
>
  <tkit:DataGridTemplateColumn.CellTemplate
>
    <DataTemplate
>
      <TextBlock Text="{Binding JobTitle
}"/>
    </DataTemplate
>
  </tkit:DataGridTemplateColumn.CellTemplate
>
  <tkit:DataGridTemplateColumn.CellEditingTemplate
>
    <DataTemplate
>
      <TextBox Text="{Binding JobTitle, Mode
=TwoWay}"/>
    </DataTemplate
>
  </tkit:DataGridTemplateColumn.CellEditingTemplate
>
</tkit:DataGridTemplateColumn>

Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>