title: Removing the Drilldown Plus Icon (+) from XtraGrid GridView's MasterRow when ChildRow Has No Data
body: <p>This is related to a DevExpess XtraGrid's GridView.</p>
  
  <p>I need to remove the <code>drilldown plus icon (+)</code> from any MasterRow in a GridView that doesn't have any data for it's ChildRow.</p>
  
  <p>Currently, all the rows (MasterRows) in my GridView display the <code>drilldown plus icon (+)</code>. When the <code>drilldown plus icon (+)</code> is clicked, the ChildRow is displayed with the appropriate data. But, if the ChildRow has no data, then the ChildRow is not displayed (expanded). I need to make the <code>drilldown plus icon (+)</code> invisible so that the user doesn't see it if there is no data in the ChildRow.</p>
  
  <p>I have a function that checks if data is available for the ChildRow, which then allows the ChildRow to display (expand) or not.</p>
  
  <p>I have used <strong><code>GridView.OptionsView.ShowDetailButtons</code></strong> but that hides the <code>drilldown plus icons (+)</code> on all the rows. That doesn't work for me since I only need to hide it if there is no data for the ChildRow.</p>
  
  <p>Here is the code that I have so far:</p>
  
  <pre><code>private void gridView1_MasterRowGetRelationCount(object sender, MasterRowGetRelationCountEventArgs e)
  {
      e.RelationCount = 1;
  }
  
  private void gridView1_MasterRowEmpty(object sender, MasterRowEmptyEventArgs e)
  {
      e.IsEmpty = IsRelationEmpty(e.RowHandle, e.RelationIndex);
  }
  
  bool IsRelationEmpty(int rowHandleX, int relationIndex)
  {
      Tuple&lt;string, double, double&gt; row = (Tuple&lt;string, double, double&gt;)gridView1.GetRow(rowHandleX);
      return rowHandleX == DevExpress.XtraGrid.GridControl.InvalidRowHandle || _tfs._dataDictionary[row.Item1.ToString()].Item2.Count == 0;
  }
  
  private void gridView1_MasterRowGetChildList(object sender, MasterRowGetChildListEventArgs e)
  {
      if (IsRelationEmpty(e.RowHandle, e.RelationIndex))
      {
          return;
      }
  
      Tuple&lt;string, double, double&gt; row = (Tuple&lt;string, double, double&gt;)gridView1.GetRow(e.RowHandle);
      e.ChildList = _tfs._dataDictionary[row.Item1.ToString()].Item2.ToList(); // _tfs.DictionaryToList();
  }
  
  private void gridView1_MasterRowGetRelationName(object sender, MasterRowGetRelationNameEventArgs e)
  {
      e.RelationName = "Work Items with no Size Estimate:";
  }
  </code></pre>
  
  <p>Any direction or suggestions would be greatly appreciated.</p>
  
  <p>Thanks in advance,</p>
  
  <p>Marwan (^_^)</p>