1st thing, thanks for the controls, I'm doing a personal project and its nice to have a complete set of controls :)
1st time caller, not 1st time developer.
So, this is the scenario I'm facing.
I'm got a sfDataGrid control being used to show the channel number\order and the channel name, I'using the drag n drop feature to change the order of the channels.
My data source of the grid is an ObservableCollection<T>, so, when I move the channel up or down, I'm moving the item inside the ObservableCollection (using the move method) and switching the channel number.
The item changes its position inside the ObservableCollection, but the grid doesn't update its content.
I already tried to to clear the observable collection and add all the items again by the order I want and the result is the same.
This is a snippet of the code I'm using, pretty standard (mth for the event: QueryRowDragging).
if (e.Reason == QueryRowDraggingReason.DragEnded)
if (e.From == e.To)
e.Cancel = true;
int fromIndex = e.From - 1;
int toIndex = e.To - 1;
((sender as SfDataGrid).ItemsSource as ObservableCollection<ChannelInformation>).Move(fromIndex, toIndex)
What happens is that the observable collection is changed, but the grid stays the same, even after calling the dfDataGrid method Refresh().
What am I doing wrong?