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

Another drag and drop problem with RadGridView

1 Answer 43 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mike Maddux
Top achievements
Rank 1
Mike Maddux asked on 08 Jun 2010, 12:20 AM
Hello!

We are using RadControls for Silverlight 4.

I have downloaded the demo at http://demos.telerik.com/silverlight/#DragAndDrop/TreeToGrid

The only change I made is to MainPage.xaml, where I was forced to remove the reference to DefaultHeaderedContentControlStyle, which was not available to me.

The drag and drop between the various elements works fine, but if you try to reorder the columns, by dragging a column header to the right or left, you get a null reference exception.

The demo that appears on your site doesn't seem to produce an exception, but it does have odd behavior if you try to reoder columns by dragging the header.  It causes a new row to appear in the grid, and the columns are not reordered.

Is there a workaround for this?  Our users want drag and drop for rows, but they also want to be able to reorder columns.

Thanks,

Mike Maddux

1 Answer, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 10 Jun 2010, 09:40 AM
Hi Mike Maddux,

In order to avoid the exception while dragging columns you can  use the following code in each drag & drop handlers:
if (e.Options.Source is GridViewHeaderCell)
{
    return;
}

Please check this post -http://blogs.telerik.com/tsvyatkokonov/posts/10-05-20/enable_radgridview_rsquo_s_rows_reorder_functionality_using_behaviors.aspx - demonstrating  row reorder functionality.


All the best,
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
Mike Maddux
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Share this question
or