title: How to set First Dropdown value as default for first line in grid then Second value defaults from second line in grid
body: <p>In the Product drop-down, there are  2 values, First value (Product) will default for first line only and Second value (Co-Product) will default from the second line.</p>
  
  <p>I tried this in FieldDefaulting event </p>
  
  <pre><code>    protected void TSFormulaProdsNCoProds_Product_FieldDefaulting(PXCache cache, PXFieldDefaultingEventArgs e)
      {
          var row = (TSFormulaProdsNCoProds)e.Row;
          if (row == null)
              return;
          if (TSFormProdsNCoProds.Select().Count == 0)
          {
              e.NewValue = "P";
          }
          else
          {
              e.NewValue = "C";
          }
      }
  </code></pre>
  
  <p>Can anyone provide a suggestion to me?</p>