In MVVM, we need to bind the slider value to a ViewModel property
<Slider Name="sampleSlider" Minimum="1" Maximum="100" Value="{Binding SomeProperty, Mode=TwoWay}" ValueChanged="sampleSlider_ValueChanged" />
And in your viewmodel, assign to a property.
private int _someProperty ;
public int SomeProperty
{
get
{
return _someProperty ;
}
set
{
_someProperty = value;
}
}
And then you use the viewmodel with the datagrid.
Otherwise, you can use the slider DragCompleted event handler to make updates to the datagrid.