Styling DropIndicator of GridViewHeaderCell

4 posts, 0 answers
  1. Marcus
    Marcus avatar
    43 posts
    Member since:
    Aug 2012

    Posted 09 Sep 2014 Link to this post

    Hi support,

    is it possible to style the DropIndicator of the GridViewHeaderCell?
    When rearranging the columns of the grid DropIndicatorBrush and DropIndicatorThickness are not enough, I also want to display an arrow at the point at which the column can be dropped.

    Regards
    Marcus
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 09 Sep 2014 Link to this post

    Hi Marcus,

    I can suggest you configuring a different, proper ReorderColumnsModeYou can check all the possible ColumnReorderOptions and decide which one fits best to your requirement.

    Regards,
    Didie
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. Marcus
    Marcus avatar
    43 posts
    Member since:
    Aug 2012

    Posted 09 Sep 2014 Link to this post

    Hi Didie,

    I knew these options but that is not the effect I want.
    In the attached file I have used a grid with the option "Interactive". With this options I see a yellow line in the header row and a preview of the arranged columns if I would drop my drag column.

    I need an arrow below the yellow line (like the black one in the image) for better marking the place where the column will be dropped.

    Regards
    Marcus
  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 12 Sep 2014 Link to this post

    Hi Marcus,

    Generally, you could specify your own DragCue to be displayed while dragging the header.  Still, it is not possible to make the arrow point at the exact border where the column will be dropped. You can check the Set Drag Visual article on how to do so. You can also find more sample code on our Drag and Drop WPF Demos (search for Reorder Rows).

    Please note that when dragging and dropping a column's header, you should subscribe for the respective event handlers specifying the last HandledEventsToo parameter to True.
    private void SubscribeToDragDropEvents()
    {
        DragDropManager.AddDragInitializeHandler(this.AssociatedObject, OnDragInitialize, true);
        ...
    }

    This is needed as RadGridView already handles those events internally.

    Regards,
    Dimitrina
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top