title: C# - DevExpress XtraGrid - Master/Detail - Display Format
body: <h3>Scenario</h3>
  <ul>
  <li>I have a DevExpress XtraGrid.</li>
  <li>The data displayed is in a master/detail format, whereby clicking the '+' at the start of the row expands the detail for that master row.</li>
  <li>I have implemented this by binding the grids datasource to a dictionary of objects that contain their own Dictionary property (to hold the detail).</li>
  </ul>
  <h3>Problem</h3>
  <ul>
  <li>What I want to do is format the data in specific columns of the detail.</li>
  <li>However, I cannot get hold of the column, presumably because it is a sub-element of the master row (and therefore does not get checked?)</li>
  <li>Below are 2 code examples of the implementations I have tried so far that do not work.</li>
  </ul>
  <h3>Attempted Code Solutions</h3>
  <pre><code>gridView1.Columns[&quot;Price&quot;].DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
                  gridView1.Columns[&quot;Price&quot;].DisplayFormat.FormatString = &quot;n4&quot;;
  
  
    private void gridView1_RowCellStyle(object sender, RowCellStyleEventArgs e)
          {
              GridView View = sender as GridView;
              if (e.Column.FieldName == &quot;Price&quot;)
              {
                  e.Column.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
                  e.Column.DisplayFormat.FormatString = &quot;n4&quot;;
              }
              }
  </code></pre>
  <p>Help greatly appreciated.</p>