title: Set the Visibility of Data Grid in WPF
body: <p>In my application I have 3 data grids in a single xaml file. Based on the User selection I want show one grid and hide other grids.</p>
  
  <p>in my view model class I have Boolean property for each grid and based on the selection I am setting it to true or false.But all grids are visible . </p>
  
  <pre><code>    &lt;DataGrid  Visibility="{Binding Path=IsGridVisible}" &gt;
  </code></pre>
  
  <p>In my view model I am setting IsGridVisible value</p>
  
  <pre><code>public bool IsCapexGridVisible
      {
          get { return isCapexGridVisible; }
          set { isCapexGridVisible = value; RaisePropertyChangedEvent("IsCapexGridVisible"); }
      }
  </code></pre>
  
  <p>Please provide your ideas. Thanks</p>