Home Forums WPF controls Xceed DataGrid for WPF Disable column reorder of data grid control.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #23958 |

    I’m using a code to disable column reorder:

    <DataTemplate>
    <xcdg:ColumnManagerRow AllowColumnReorder=”False” />
    </DataTemplate>
    And when draging the column header trying to test it, I’m getting Exception:
    System.NullReferenceException was unhandled
    Message=”Object reference not set to an instance of an object.”
    Source=”Xceed.Wpf.DataGrid”
    StackTrace:
    at Xceed.Wpf.Utils.DragDrop.DragSourceManager.BeginDrag()
    at Xceed.Wpf.Utils.DragDrop.DragSourceManager.ProcessMouseMove(MouseEventArgs e)
    at Xceed.Wpf.DataGrid.ColumnManagerCell.OnMouseMove(MouseEventArgs e)
    at System.Windows.UIElement.OnMouseMoveThunk(Object sender, MouseEventArgs e)
    And so on..
    Can someone answer me what I’m doing wrong?

    Imported from legacy forums. Posted by Lena (had 1394 views)

    User (Old forums)
    Member
    Post count: 23064

    Horray! Problem solved. The actual problem was that I’ve customized Headers and Footers, and when trying drag and drop, I’ve got null reference exception. Adding AdornerDecorator wrapping around GridControl solved the problem. Thanks. Lena

    Imported from legacy forums. Posted by Lena (had 3488 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.