Cannot Drag Row with my DataGridTemplateColumn

Oct 28, 2009 at 11:19 AM

 Hi experts,

I can drag&drop the rows in my DataGrid by RowHeader or other DataGridCell.
But drag&drop doesn't work when mouse is clicking on the DataGridCell which defined the DataGridTemplateColumn as following.
I don't understand what's wrong, is there anyone can help me?
            <dg:DataGridTemplateColumn Header="Parameters" CanUserSort="False"  Width="Auto">
                <dg:DataGridTemplateColumn.CellTemplate>
                    <DataTemplate>
                    <Button Width="Auto" Click="btnGridParams_Click">
                            <Button.Template>
                                <ControlTemplate>
                                <TextBlock Text="{Binding Path=OutputType, Converter={StaticResource OutputTypeToDisplayConverter}}" 
                                                       Visibility="{Binding Path=IsFileInGroup, Converter={StaticResource BoolTrueToHidden}}"
                                                       Foreground="{Binding RelativeSource={RelativeSource AncestorType={x:Type dg:DataGridCell}}, Path=Foreground}"/>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
                    </DataTemplate>
                </dg:DataGridTemplateColumn.CellTemplate>
            </dg:DataGridTemplateColumn>

 Thanks very much

Dan