This question is locked. New answers and comments are not allowed.
Following this example exactly . . .
http://localhost:65230/Default.aspx#GridView/RowReorder
Object reference not set to an instance of an object on (arrowed below) . . . In debugging, source is always null.
<telerik:RadGridView x:Name="_radGridView1" ItemsSource="{Binding Data, ElementName=_supplyDomainDataSource}" IsReadOnly="True" ShowGroupPanel="False" AllowDrop="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" AutoGenerateColumns="False" SelectionMode="Extended" ScrollMode="Deferred">
private void OnDragInfo(object sender, DragDropEventArgs e) { if (!(e.Options.Source is GridViewRow)) { return; } RadGridView gridView = sender as RadGridView; IEnumerable draggedItems = e.Options.Payload as IEnumerable; if (e.Options.Status == DragStatus.DragInProgress) { this.dragCue = this.CreateDragCue(); this.dragCue.ItemsSource = draggedItems; e.Options.DragCue = this.dragCue; } else if (e.Options.Status == DragStatus.DragComplete) { IList source = gridView.ItemsSource as IList; <<<-------------------- foreach (object draggedItem in draggedItems) { source.Remove(draggedItem); } } } private void OnGridViewRowDropQuery(object sender, DragDropQueryEventArgs e) { if (!(e.Options.Source is GridViewRow)) { return; } GridViewRow row = sender as GridViewRow; if (e.Options.Status == DragStatus.DropDestinationQuery) { this.currentDropItem = row.Item; this.currentDropPosition = this.GetDropPositionFromPoint(e.Options.CurrentDragPoint, row); e.QueryResult = true; e.Handled = true; } }
HELP!!