title: Disabling button on a particular row in WPF gridview
body: <p>This is my code for generating the gridview   </p>
  
  <pre><code>        User u1 = new User();
          User u2 = new User();
  
          for (int i = 0; i &lt; files.Count; i++)
          {
              u1.Files = files[i];
              items.Add(u1);
          }
  
          for (int i = 0; i &lt; sharedFiles.Count; i++)
          {
              u2.Files += sharedFiles[i];
              items.Add(u2);
          }
          gridview1.ItemsSource = items;
      }
  
      public class User
      {
          public string Files { get; set; }
      }
  </code></pre>
  
  <p>This is my xaml page  </p>
  
  <pre><code> &lt;ListView.View&gt;
              &lt;GridView &gt;
                  &lt;GridView.Columns&gt;
  
                      &lt;GridViewColumn Width="250" DisplayMemberBinding="{Binding Files}" &gt;&lt;/GridViewColumn&gt;
  
                      &lt;GridViewColumn &gt;
                          &lt;GridViewColumn.CellTemplate&gt;
                              &lt;DataTemplate&gt;
                                  &lt;Button Content="Download" Click="fileDownloadClick" CommandParameter="{Binding Files}"&gt;&lt;/Button&gt;
                              &lt;/DataTemplate&gt;
                          &lt;/GridViewColumn.CellTemplate&gt;
                      &lt;/GridViewColumn&gt;
  
                      &lt;GridViewColumn&gt;
                          &lt;GridViewColumn.CellTemplate&gt;
                              &lt;DataTemplate&gt;
                                  &lt;Button Content="Share"  Click="fileShareClick"  CommandParameter="{Binding Files}" &gt;&lt;/Button&gt;
                              &lt;/DataTemplate&gt;
                          &lt;/GridViewColumn.CellTemplate&gt;
                      &lt;/GridViewColumn&gt;
  
                  &lt;/GridView.Columns&gt;
  
              &lt;/GridView&gt;
   &lt;/ListView.View&gt;  
  </code></pre>
  
  <p>I would like to know if its possible to only allow my Share buttons disabled in my 2nd for loop (u2) while my Share buttons in (u1) is still enabled. Currently both are enabled. I am currently using  this to retrieve values for particular role  </p>
  
  <pre><code> private void fileShareClick(object sender, RoutedEventArgs e)
      {
          object share = ((Button)sender).CommandParameter;
      }
  </code></pre>