Hi, I'm trying to create a draggable column, but when I set the CellCLickAction to SelectRecord, the dragging doesn't work anymore. I have added an isolated sample that illustrates this behavior. If you start the sample you will see that 1 grid has a draggable column, and the other does not. The only difference is the CellClickAction setting. Any Advice?
Hello,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I handled the PreviewMouseLeftButtonDown event of the first grid and if the OriginalSource is Rectangle I put the CellIntoEditMode – this way you are able to drag it. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
Hi Stefan, thank you for your response. I just learned from one of the Infragistics articles that UnboundField is now obsolete and should no longer be used. So I tried to replace the UnboundField with a TemplateField like so:
<igDP:TemplateField BindingType="UseAlternateBinding" AlternateBinding="{Binding}">
<igDP:TemplateField.DisplayTemplate>
<DataTemplate>
<Rectangle Width="20" Height="20" Fill="Blue">
<ig:DragDropManager.DragSource>
<ig:DragSource IsDraggable="True" />
</ig:DragDropManager.DragSource>
</Rectangle>
</DataTemplate>
</igDP:TemplateField.DisplayTemplate>
</igDP:TemplateField>
But now the dragging no longer works immediately. I mean that you first have to click the record, and only then can you drag the row using the rectangle. How can I make it so that it works just like the UnboundField did? P.S. If possible, I would rather not change the CellValuePresenterStyle, because I have learned in another post that this can mess up theming. (Once you set a custom CellValuePresenterStyle, it is no longer possible to change the IG Theme). Regards, Stefan