Reputation: 43
I'm having this problem:
I'd like to try to make a pop up for CrossSection
table page using AllowEdit = "true"
, the pencil symbol has already showed, but it doesn't open anything, I already entered the page of CrossSection
into hidden in SiteMap
. Is there any step I miss to use AllowEdit
? How can I use AllowEdit
?
Upvotes: 3
Views: 1383
Reputation: 328
This is not a full answer, but may be a necessary step.
I found that my grid field did not allow me to set the AllowEdit
property, by which I mean, it simply did not exist. It was a PXSelector
etc etc, but different than a normal, stand-alone selector. I even tried adding the AllowEdit
code manually, but it was removed upon saving.
Browsing another grid that had a selector with links, I discovered a RowTemplate
section, which I have not seen before.
<px:PXTabItem Text="Salespersons" LoadOnDemand="True">
<Template>
<px:PXGrid ID="PXGrid1" runat="server" Height="300px" Width="100%" SkinID="DetailsInTab" DataSourceID="ds">
<Levels>
<px:PXGridLevel DataMember="SalesPersons" DataKeyNames="SalesPersonID,LocationID">
<Columns>
<px:PXGridColumn DataField="SalesPersonID" ></px:PXGridColumn>
<px:PXGridColumn DataField="SalesPersonID_SalesPerson_descr" ></px:PXGridColumn>
<px:PXGridColumn DataField="LocationID" ></px:PXGridColumn>
<px:PXGridColumn DataField="LocationID_description" ></px:PXGridColumn>
<px:PXGridColumn DataField="CommisionPct" TextAlign="Right" ></px:PXGridColumn>
<px:PXGridColumn DataField="IsDefault" Type="CheckBox" TextAlign="Center" ></px:PXGridColumn>
</Columns>
<RowTemplate>
<px:PXLayoutRule runat="server" StartColumn="True" LabelsWidth="SM" ControlSize="M" ></px:PXLayoutRule>
<px:PXSegmentMask ID="edSalesPersonID" runat="server" DataField="SalesPersonID" AutoRefresh="True" AllowEdit="True" ></px:PXSegmentMask>
<px:PXSegmentMask ID="edLocationID" runat="server" DataField="LocationID" AutoRefresh="True" AllowEdit="True" ></px:PXSegmentMask>
<px:PXTextEdit ID="edLocation_descr" runat="server" DataField="LocationID_description" Enabled="False" ></px:PXTextEdit>
<px:PXNumberEdit ID="edCommisionPct" runat="server" DataField="CommisionPct" ></px:PXNumberEdit>
</RowTemplate>
<Mode InitNewRow="False" ></Mode>
<Layout FormViewHeight="" ></Layout>
</px:PXGridLevel>
</Levels>
<AutoSize Enabled="True" MinHeight="100" MinWidth="100" ></AutoSize>
<ActionBar>
<Actions>
<Save Enabled="False" ></Save>
</Actions>
</ActionBar>
</px:PXGrid>
</Template>
</px:PXTabItem>
It seems this gives the data fields their design template or something. After adding a similar section to my ASPX, the link appeared.
Upvotes: 1
Reputation: 2340
Along with PXSelector
attribute and AllowEdit
for PXSelector
aspx control, make sure to set the primary graph for the DAC.
The primary graph determines the default page where a user is redirected for editing a data record.
Example:
[PXPrimaryGraph(typeof(CrossSectionMaint))]
[Serializable]
public class CrossSection : PX.Data.IBqlTable
{
...
}
Upvotes: 5