I have created a new table which is a child table for Vendor. Here I want to store some dates for each vendor. Below is the table structure (where CompanyID and RecordID is a PrimaryKey, RecordID is Identity with seed 1)-
CREATE TABLE [dbo].[VendorClosedDates](
[CompanyID] [int] NOT NULL,
[RecordID] [int] IDENTITY(1,1) NOT NULL,
[VendorID] [int] NOT NULL,
[VendorCloseDate] [datetime] NOT NULL,
[tstamp] [timestamp] NOT NULL,
[CreatedByID] [uniqueidentifier] NOT NULL,
[CreatedByScreenID] [char](8) NOT NULL,
[CreatedDateTime] [datetime] NOT NULL,
[LastModifiedByID] [uniqueidentifier] NOT NULL,
[LastModifiedByScreenID] [char](8) NOT NULL,
[LastModifiedDateTime] [datetime] NOT NULL,
CONSTRAINT [PK_VendorClosedDates] PRIMARY KEY CLUSTERED
(
[CompanyID] ASC,
[RecordID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
Based on this I have created a custom project with dataview and added a new tab with grid to display all dates (only 1 column) from the new table. Based on the vendor I browse, these grid should refresh and show me only related data. However, for some reason it is not refreshing and not even showing any data. Below is the screenshot and some code snippet to help understand how I have code in place. May be I am missing something.
Grid code-
<px:PXTabItem Text="Closed Dates">
<Template>
<px:PXGrid runat="server" ID="CstPXGrid79" DataSourceID="ds" SkinID="DetailsInTab" Height="150px" Width="100%" AdjustPageSize="Auto" AllowPaging="True">
<Levels>
<px:PXGridLevel DataMember="ClosedDates">
<Columns>
<px:PXGridColumn DataField="VendorCloseDate" Width="90" /></Columns>
<RowTemplate>
<px:PXDateTimeEdit runat="server" ID="CstPXDateTimeEdit82" DataField="VendorCloseDate" /></RowTemplate></px:PXGridLevel></Levels>
<Mode AllowAddNew="True" AllowDelete="True" AllowUpdate="True" />
<AutoSize MinHeight="1000" /></px:PXGrid></Template></px:PXTabItem>
DAC snippet-
#region RecordID
public abstract class recordID : PX.Data.IBqlField
{
}
protected int? _RecordID;
[PXDBIdentity(IsKey = true)]
public virtual int? RecordID
{
get
{
return this._RecordID;
}
set
{
this._RecordID = value;
}
}
#endregion
#region VendorID
public abstract class vendorID : PX.Data.IBqlField
{
}
protected int? _VendorID;
[PXDBInt()]
[PXDefault(typeof(Vendor.bAccountID))]
public virtual int? VendorID
{
get
{
return this._VendorID;
}
set
{
this._VendorID = value;
}
}
#endregion
#region VendorCloseDate
public abstract class vendorCloseDate : PX.Data.IBqlField
{
}
protected DateTime? _VendorCloseDate;
[PXDBDate()]
[PXUIField(DisplayName = "Vendor Close Date")]
public virtual DateTime? VendorCloseDate
{
get
{
return this._VendorCloseDate;
}
set
{
this._VendorCloseDate = value;
}
}
#endregion
Dataview and Vendor_RowSelecting event under VendorMaint extension-
[PXViewName("ClosedDates")]
public PXSelect<VendorClosedDates,
Where<VendorClosedDates.vendorID, Equal<Current<Vendor.bAccountID>>>> ClosedDates;
protected virtual void Vendor_RowSelecting(PXCache cache, PXRowSelectingEventArgs e)
{
ClosedDates.View.RequestRefresh();
}
Any suggestion.

