title: MVVM what part of pattern responsible for grouping of datagrid
body: <p>I've been tinkering around with the MVVM pattern and now I'm trying to implement a little application based on it.</p>
  
  <p>This application has a datagrid in which, surprisingly enough, some data is presented. Now I'm trying to add some grouping ability to it. I know how to write this in code (C# and XAML), but I'm wondering in what layer I should put the responsible code.</p>
  
  <p>One part of me tells me it should be in the view, because it's code especially for that specific view. It's not generic and serves one purpos: to group the data.</p>
  
  <p>On the other hand I think I should handle it in the ViewModel using a command. It feels, though, as if I'm contaminating my ViewModel with View specific logic.</p>
  
  <p>Any ligt that can be shed on this?</p>