Hi Friends.I have the following screen. I need that when the screen loads (if it is a new record) the grid Alternates have a one row by default.
This is the way I have been working but it doesn't work.
using System;
using PX.Data;
using PX.Data.BQL.Fluent;
using System.Linq;
namespace Estimating
{
public class EstimateEntry : PXGraph<EstimateEntry, CEEstimate >
{
protected void CEEstimateAlternate_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
{
var row = (CEEstimateAlternate)e.Row;
if (row == null)
return;
CEEstimateAlternate line = new CEEstimateAlternate();
line.Number=1;
line.Description = "Base Bid";
line.Type = "INCLUDED";
this.viewCEEstimateAlternates.Insert(line);
}
}
}
Aditional.
- The header view is: viewCEEstimate.
- The DAC header is: CEEstimate.
- The grid view (Alternate) is: viewCEEstimateAlternates.
- The DAC grid (Alternate) is: CEEstimateAlternate.
- The structure of alternates is simple: Number (int), Description (Text), Type (Text-Combobox)
- The screen is a customization project.
I only need when de screen loads in the grid alternates insert a row automatically.
Can you help me please.