This is a migrated thread and some comments may be shown as answers.

Drag & Drop is causing Column Sizing to fail.

1 Answer 24 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rick Knicely
Top achievements
Rank 1
Rick Knicely asked on 06 May 2010, 02:43 PM
I've noticed that when I add drag and drop to a grid the column sizing no loger works.

I have implemented the drag/drop events..

        private void OnDropQuery(object sender, DragDropQueryEventArgs e)
        {

            Type sourceType = e.Options.Source.GetType();
            if (sourceType == typeof(GridViewHeaderCell))
            {
                return;
            }
        .
        .
        .

and
        #region dragQuery
        protected virtual void OnDragQuery(object sender, DragDropQueryEventArgs e)
        {
            if (sourceType == typeof(GridViewHeaderCell))
            {
                e.QueryResult = true;
            }
        .
        .
        .

How should the drag and drop respond to the GridViewHeader?

1 Answer, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 11 May 2010, 11:37 AM
Hello Rick Knicely,

The cause of the problem is related to this line of code:
protected virtual void OnDragQuery(object sender, DragDropQueryEventArgs e)
       {
           if (sourceType == typeof(GridViewHeaderCell))
           {
               e.QueryResult = true;
           }

Setting QueryResult to true, enables dragging even in case of resizing the columns and overrides resizers default behavior.

Best wishes,
Tsvyatko
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Rick Knicely
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Share this question
or