无法在GL404000屏幕上触发fieldupdated或rowupdated事件 [英] unable to fire the fieldupdated or rowupdated event on GL404000 screen

查看:78
本文介绍了无法在GL404000屏幕上触发fieldupdated或rowupdated事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试扩展AccountByPeriodEnq业务逻辑,但是我面临以下问题:



我似乎无法触发GLTranR_RowUpdated或GLTranR_Selected_FieldUpdated事件。 (除非单击刷新按钮,否则将触发事件)



这是我的代码:

  #region EventHandler 
保护无效GLTranR_Selected_FieldUpdated(PXCache缓存,PXFieldUpdatedEventArgs e,PXFieldUpdated del)
{
del?.Invoke(cache,e);
var row =(GLTranR)e.Row;
}

保护无效GLTranR_RowUpdated(PXCache缓存,PXRowUpdatedEventArgs e)
{
var row =(GLTranR)e.Row;
}

#endregion

当我在断点上



似乎也从未触发过原始事件(位于AccountByPeriodEnq.cs图中),因为我从未看到过重新分类按钮

 受保护的虚拟无效GLTranR_Selected_FieldUpdated(PXCache sender,PXFieldUpdatedEventArgs e)
{
reclassify.SetEnabled (GetSelectedTrans()。Any());
}

我已经检查了aspx,并为



以下是aspx:

  <% @页面语言= C# MasterPageFile =〜/ MasterPages / FormDetail.master AutoEventWireup = true 
ValidateRequest = false CodeFile = GL404000.aspx.cs Inherits = Page_GL404000
Title =无标题页面%>

<%@ MasterType VirtualPath =〜/ MasterPages / FormDetail.master%>
< asp:Content ID = Content1 ContentPlaceHolderID = phDS runat = Server>
< px:PXDataSource ID = ds runat = server Visible = True Width = 100% TypeName = PX.Objects.GL.AccountByPeriodEnq
PrimaryView = Filter PageLoadBehavior = PopulateSavedValues>
< CallbackCommands>
< px:PXDSCallbackCommand CommitChanges = True Name = previousperiod HideText = True />
< px:PXDSCallbackCommand CommitChanges = True Name = nextperiod HideText = True />
< px:PXDSCallbackCommand DependOnGrid = grid Name = Reclassify CommitChanges = True />
< px:PXDSCallbackCommand DependOnGrid = grid Name = ReclassifyAll />
< px:PXDSCallbackCommand DependOnGrid = grid Name = ReclassificationHistory StateColumn = IncludedInReclassHistory />
< / CallbackCommands>
< / px:PXDataSource>
< / asp:Content>
< asp:Content ID = Content2 ContentPlaceHolderID = phF runat = Server>
< px:PXFormView ID = form runat = server Width = 100%
Caption = Selection DataMember = Filter DefaultControlID = edFinPeriodID DataSourceID = ds TabIndex = 100>
< Template>
< px:PXLayoutRule runat = server StartColumn = True LabelsWidth = SM ControlSize = M< / px:PXLayoutRule>
< px:PXSelector CommitChanges = True ID = edOrganizationID runat = server DataField = OrganizationID>< / px:PXSelector>
< px:PXSegmentMask CommitChanges = True ID = edBranchID runat = server DataField = BranchID Autorefresh = true>< / px:PXSegmentMask>
< px:PXSelector CommitChanges = True ID = edLedgerID runat = server DataField = LedgerID Autorefresh = true>< / px:PXSelector>
< px:PXSelector CommitChanges = True ID = edStartPeriodID runat = server DataField = StartPeriodID>< / px:PXSelector>
< px:PXSelector CommitChanges = True ID = edEndPeriodID runat = server DataField = EndPeriodID Autorefresh = True>< / px:PXSelector>
< px:PXSegmentMask CommitChanges = True ID = edAccountID runat = server DataField = AccountID>< / px:PXSegmentMask>
< px:PXSegmentMask CommitChanges = True ID = edSubID runat = server DataField = SubID SelectMode = Segment>< / px:PXSegmentMask>
< px:PXLayoutRule runat = server StartColumn = True LabelsWidth = SM ControlSize = S>< / px:PXLayoutRule>
< px:PXDateTimeEdit CommitChanges = True ID = edStartDateUI runat = server DataField = StartDateUI>< / px:PXDateTimeEdit>
< px:PXDateTimeEdit CommitChanges = True ID = edPeriodStartDate runat = server DataField = PeriodStartDateUI>< / px:PXDateTimeEdit>
< px:PXDateTimeEdit CommitChanges = True ID = edEndDateUI runat = server DataField = EndDateUI>< / px:PXDateTimeEdit>
< px:PXDateTimeEdit CommitChanges = True ID = edPeriodEndDateUI runat = server DataField = PeriodEndDateUI>< / px:PXDateTimeEdit>
< px:PXNumberEdit runat =服务器 ID = CstPXNumberEdit1 DataField = UsrCreditTotal CommitChanges = True />
< px:PXNumberEdit runat =服务器 ID = CstPXNumberEdit2 DataField = UsrDebitTotal CommitChanges = True />
< px:PXNumberEdit runat =服务器 ID = CstPXNumberEdit14 DataField = UsrSolde CommitChanges = True />
< px:PXLayoutRule runat = server StartColumn = True SuppressLabel = True>< / px:PXLayoutRule>
< px:PXCheckBox CommitChanges = True ID = chkShowSummary runat = server DataField = ShowSummary>< / px:PXCheckBox>
< px:PXCheckBox CommitChanges = True ID = chkIncludeUnposted runat = server DataField = IncludeUnposted>< / px:PXCheckBox>
< px:PXCheckBox CommitChanges = True ID = chkIncludeUnreleased runat = server DataField = IncludeUnreleased>< / px:PXCheckBox>
< px:PXCheckBox CommitChanges = True ID = chkIncludeReclassified runat = server DataField = IncludeReclassified>< / px:PXCheckBox>
< px:PXCheckBox CommitChanges = True ID = chkShowCuryDetail runat = server DataField = ShowCuryDetail>< / px:PXCheckBox>

< px:PXLayoutRule runat = server StartColumn = True>
< / px:PXLayoutRule>
< px:PXNumberEdit ID = edBegBal runat = server DataField = BegBal>
< / px:PXNumberEdit>
< px:PXNumberEdit ID = edTurnOver runat = server DataField = TurnOver>
< / px:PXNumberEdit>
< px:PXNumberEdit ID = edEndBal runat = server DataField = EndBal>
< / px:PXNumberEdit>
< px:PXGroupBox runat = server ID = groupAffichage Caption = Afficher CommitChanges = True DataField = UsrAffichage RenderSimple = True RenderStyle = RoundBorder>
< ContentLayout Layout = Stack />
< Template>
< px:PXRadioButton runat = server ID = CstRadioButton15 Text = Tous Value = 0 Checked = False GroupName = groupAffichage />
< px:PXRadioButton runat = server ID = CstRadioButton16 Value = 1 Text = Lettres GroupName = groupAffichage Checked = False />
< px:PXRadioButton runat = server ID = CstRadioButton17 GroupName = groupAffichage Value = 2 Text =非字母 Checked = True />< / Template>< / px:PXGroupBox>< / Template>
< / px:PXFormView>< / asp:Content>
< asp:Content ID = Content3 ContentPlaceHolderID = phG runat = Server>
< px:PXGrid ID = grid runat = server Height = 150px
Width = 100% AllowPaging = True AdjustPageSize = Auto Caption =按期间汇总 SyncPosition = True FastFilterFields = TranDesc,RefNbr,
BatchUpdate = True AllowSearch = True SkinID = PrimaryInquire RestrictFields = True DataSourceID = ds TabIndex = 100 PreserveSortsAndFilters = 假>
< CallbackCommands>
<刷新RepaintControlsIDs = form />
< / CallbackCommands>
< AutoSize Container = Window Enabled = True />
< Mode AllowAddNew = False AllowDelete = False />
<级别>
< px:PXGridLevel DataMember = GLTranEnq>
< Columns>
< px:PXGridColumn DataField = Selected TextAlign = Center Type = CheckBox Width = 30px AllowCheckAll = True AllowShowHide = Server CommitChanges = True>< / px :PXGridColumn>
< px:PXGridColumn DataField =模块 Width = 100px>< / px:PXGridColumn>
< px:PXGridColumn DataField = BatchNbr Width = 100px LinkCommand = ViewBatch>< / px:PXGridColumn>
< px:PXGridColumn DataField = TranDate Width = 100px>< / px:PXGridColumn>
< px:PXGridColumn DataField = FinPeriodID Width = 100px>< / px:PXGridColumn>
< px:PXGridColumn DataField = TranDesc Width = 224px>< / px:PXGridColumn>
< px:PXGridColumn DataField = RefNbr Width = 100px LinkCommand = ViewDocument>< / px:PXGridColumn>
< px:PXGridColumn DataField = LineNbr TextAlign = Right Width = 100px>< / px:PXGridColumn>
< px:PXGridColumn DataField = BranchID Width = 100px>< / px:PXGridColumn>
< px:PXGridColumn DataField = AccountID Width = 108px>< / px:PXGridColumn>
< px:PXGridColumn DataField = SubID Width = 198px>< / px:PXGridColumn>
< px:PXGridColumn DataField = SignBegBalance TextAlign = Right Width = 100px>< / px:PXGridColumn>
< px:PXGridColumn DataField = DebitAmt TextAlign = Right Width = 100px>< / px:PXGridColumn>
< px:PXGridColumn DataField = CreditAmt TextAlign = Right Width = 100px>< / px:PXGridColumn>
< px:PXGridColumn DataField = SignEndBalance TextAlign = Right MatrixMode = True Width = 100px>< / px:PXGridColumn>
< px:PXGridColumn DataField = CuryID AllowShowHide = Server>< / px:PXGridColumn>
< px:PXGridColumn DataField = SignCuryBegBalance TextAlign = Right Width = 100px AllowShowHide = Server>< / px:PXGridColumn>
< px:PXGridColumn DataField = CuryDebitAmt TextAlign = Right Width = 100px AllowShowHide = Server>< / px:PXGridColumn>
< px:PXGridColumn DataField = CuryCreditAmt TextAlign = Right Width = 100px AllowShowHide = Server>< / px:PXGridColumn>
< px:PXGridColumn DataField = SignCuryEndBalance TextAlign = Right Width = 100px AllowShowHide = Server>< / px:PXGridColumn>
< px:PXGridColumn DataField = InventoryID Width = 120px>< / px:PXGridColumn>
< px:PXGridColumn DataField = ReferenceID Width = 120px>< / px:PXGridColumn>
< px:PXGridColumn DataField = ReferenceID_BaccountR_AcctName Width = 200px>< / px:PXGridColumn>
< px:PXGridColumn DataField = ReclassBatchNbr TextAlign = Right Width = 120px AllowShowHide = Server LinkCommand = ViewReclassBatch>< / px:PXGridColumn>
< px:PXGridColumn DataField = IncludedInReclassHistory AllowShowHide = False Visible = false SyncVisible = false>< / px:PXGridColumn>
< px:PXGridColumn DataField = UsrLettrageNbr Width = 70 CommitChanges = True />< / Columns>
< / px:PXGridLevel>
< / Levels>
< AutoSize Container = Window Enabled = True MinHeight = 400 />
< ActionBar DefaultAction = DoubleClick />
< / px:PXGrid>
< / asp:Content>

我想念什么?我已经花了几个小时,但我的想法已经用光了。



编辑:



我的最终目标是在过滤器视图上计算所选行的贷项和借项之和。如果每次我选择新行时都有任何变通办法来更新这些值,我会接受。



也许使用一些JavaScript和回调命令?






我在acumatica合作伙伴中心为此事开了一张支持票。



编辑2:



因此,我创建了自己的自定义选择器:

  #region UsrletSel 
[PXBool]
[PXUIField(DisplayName = Lettrer)]

公共虚拟布尔? UsrletSel {获取;组; }
公共抽象类usrletSel:IBqlField {}
#endregion

然后我将基本选择器隐藏在aspx中,并保持原始逻辑,我将新选择器绑定到基本选择器:

  protected void GLTranR_UsrletSel_FieldUpdated (PXCache缓存,PXFieldUpdatedEventArgs e)
{
if(e.Row == null)return;
var row =(GLTranR)e.Row;
if(row.GetExtension< GLTranExt>()。UsrletSel == true)
{
row.Selected = true;
}
else
{
row.Selected = false;
}
}

我将属性CommitChanges = True设置为aspx新字段,但我仍然无法在此屏幕上触发任何事件。



您有什么主意吗?



编辑3:



所以我完全随机地触发了我的复选框(也包括原来选中的复选框)事件。您必须双击该复选框。 (这没有任何意义。)但是我不能真正告诉我的客户如果要计算总数,请双击开始。



20s


I'm trying to extend the AccountByPeriodEnq business logic, yet i'm facing the following problem :

I can't seem to fire the GLTranR_RowUpdated or GLTranR_Selected_FieldUpdated events. (Unless I click the refresh button, then the events are fired)

Here's my code :

  #region EventHandler
        protected void GLTranR_Selected_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e, PXFieldUpdated del)
        {
            del?.Invoke(cache, e);
            var row = (GLTranR)e.Row;
        }

        protected void GLTranR_RowUpdated(PXCache cache, PXRowUpdatedEventArgs e)
        {
            var row = (GLTranR)e.Row;
        }

        #endregion 

When I put a breakpoint on any of those methods, it never actually break.

It seems the original event is never fired as well (Located in AccountByPeriodEnq.cs graph) since I never see the Reclassify button being disabled.

protected virtual void GLTranR_Selected_FieldUpdated(PXCache sender, PXFieldUpdatedEventArgs e)
        {
            reclassify.SetEnabled(GetSelectedTrans().Any());
        }

I have checked in the aspx and the commitchanges=true is set for the "Selected" field.

Here's the aspx :

<%@ Page Language="C#" MasterPageFile="~/MasterPages/FormDetail.master" AutoEventWireup="true"
  ValidateRequest="false" CodeFile="GL404000.aspx.cs" Inherits="Page_GL404000"
  Title="Untitled Page" %>

<%@ MasterType VirtualPath="~/MasterPages/FormDetail.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="phDS" runat="Server">
  <px:PXDataSource ID="ds" runat="server" Visible="True" Width="100%" TypeName="PX.Objects.GL.AccountByPeriodEnq"
    PrimaryView="Filter" PageLoadBehavior="PopulateSavedValues">
    <CallbackCommands>
      <px:PXDSCallbackCommand CommitChanges="True" Name="previousperiod" HideText="True"/>
      <px:PXDSCallbackCommand CommitChanges="True" Name="nextperiod" HideText="True"/>
      <px:PXDSCallbackCommand DependOnGrid="grid" Name="Reclassify" CommitChanges="True"/>
      <px:PXDSCallbackCommand DependOnGrid="grid" Name="ReclassifyAll"/>
      <px:PXDSCallbackCommand DependOnGrid="grid" Name="ReclassificationHistory" StateColumn="IncludedInReclassHistory"/>
    </CallbackCommands>
  </px:PXDataSource>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="phF" runat="Server">
  <px:PXFormView ID="form" runat="server"   Width="100%"
    Caption="Selection" DataMember="Filter" DefaultControlID="edFinPeriodID" DataSourceID="ds" TabIndex="100">
    <Template>
      <px:PXLayoutRule runat="server" StartColumn="True" LabelsWidth="SM" ControlSize="M" ></px:PXLayoutRule>
      <px:PXSelector CommitChanges="True" ID="edOrganizationID" runat="server" DataField="OrganizationID"></px:PXSelector>
      <px:PXSegmentMask CommitChanges="True" ID="edBranchID" runat="server" DataField="BranchID" Autorefresh="true"></px:PXSegmentMask>
      <px:PXSelector CommitChanges="True" ID="edLedgerID" runat="server" DataField="LedgerID" Autorefresh="true"></px:PXSelector>
      <px:PXSelector CommitChanges="True" ID="edStartPeriodID" runat="server" DataField="StartPeriodID"></px:PXSelector>
      <px:PXSelector CommitChanges="True" ID="edEndPeriodID" runat="server" DataField="EndPeriodID" Autorefresh="True"></px:PXSelector>
      <px:PXSegmentMask CommitChanges="True" ID="edAccountID" runat="server" DataField="AccountID"></px:PXSegmentMask>
      <px:PXSegmentMask CommitChanges="True" ID="edSubID" runat="server" DataField="SubID" SelectMode="Segment"  ></px:PXSegmentMask>
      <px:PXLayoutRule runat="server" StartColumn="True" LabelsWidth="SM" ControlSize="S" ></px:PXLayoutRule>
      <px:PXDateTimeEdit CommitChanges="True" ID="edStartDateUI" runat="server" DataField="StartDateUI" ></px:PXDateTimeEdit>
      <px:PXDateTimeEdit CommitChanges="True" ID="edPeriodStartDate" runat="server" DataField="PeriodStartDateUI" ></px:PXDateTimeEdit>
      <px:PXDateTimeEdit CommitChanges="True" ID="edEndDateUI" runat="server" DataField="EndDateUI" ></px:PXDateTimeEdit>
      <px:PXDateTimeEdit CommitChanges="True" ID="edPeriodEndDateUI" runat="server" DataField="PeriodEndDateUI" ></px:PXDateTimeEdit>
      <px:PXNumberEdit runat="server" ID="CstPXNumberEdit1" DataField="UsrCreditTotal" CommitChanges="True" />
      <px:PXNumberEdit runat="server" ID="CstPXNumberEdit2" DataField="UsrDebitTotal" CommitChanges="True" />
      <px:PXNumberEdit runat="server" ID="CstPXNumberEdit14" DataField="UsrSolde" CommitChanges="True" />
      <px:PXLayoutRule runat="server" StartColumn="True" SuppressLabel="True" ></px:PXLayoutRule>
      <px:PXCheckBox CommitChanges="True" ID="chkShowSummary" runat="server" DataField="ShowSummary" ></px:PXCheckBox>
      <px:PXCheckBox CommitChanges="True" ID="chkIncludeUnposted" runat="server" DataField="IncludeUnposted" ></px:PXCheckBox>
      <px:PXCheckBox CommitChanges="True" ID="chkIncludeUnreleased" runat="server" DataField="IncludeUnreleased" ></px:PXCheckBox>
      <px:PXCheckBox CommitChanges="True" ID="chkIncludeReclassified" runat="server" DataField="IncludeReclassified" ></px:PXCheckBox>
      <px:PXCheckBox CommitChanges="True" ID="chkShowCuryDetail" runat="server" DataField="ShowCuryDetail" ></px:PXCheckBox>

      <px:PXLayoutRule runat="server" StartColumn="True">
      </px:PXLayoutRule>
      <px:PXNumberEdit ID="edBegBal" runat="server" DataField="BegBal">
      </px:PXNumberEdit>
      <px:PXNumberEdit ID="edTurnOver" runat="server" DataField="TurnOver">
      </px:PXNumberEdit>
      <px:PXNumberEdit ID="edEndBal" runat="server" DataField="EndBal">
      </px:PXNumberEdit>
      <px:PXGroupBox runat="server" ID="groupAffichage" Caption="Afficher" CommitChanges="True" DataField="UsrAffichage" RenderSimple="True" RenderStyle="RoundBorder">
        <ContentLayout Layout="Stack" />
        <Template>
          <px:PXRadioButton runat="server" ID="CstRadioButton15" Text="Tous" Value="0" Checked="False" GroupName="groupAffichage" />
          <px:PXRadioButton runat="server" ID="CstRadioButton16" Value="1" Text="Lettres" GroupName="groupAffichage" Checked="False" />
          <px:PXRadioButton runat="server" ID="CstRadioButton17" GroupName="groupAffichage" Value="2" Text="Non lettres" Checked="True" /></Template></px:PXGroupBox></Template>
  </px:PXFormView></asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="phG" runat="Server">
  <px:PXGrid ID="grid" runat="server"  Height="150px" 
    Width="100%" AllowPaging="True" AdjustPageSize="Auto" Caption="Summary By Period" SyncPosition ="True" FastFilterFields="TranDesc,RefNbr,"
    BatchUpdate="True" AllowSearch="True" SkinID="PrimaryInquire" RestrictFields="True" DataSourceID="ds" TabIndex="100" PreserveSortsAndFilters="False">
    <CallbackCommands>
      <Refresh RepaintControlsIDs="form"/>
    </CallbackCommands>
    <AutoSize Container="Window" Enabled="True" />
    <Mode AllowAddNew="False" AllowDelete="False"  />
    <Levels>
      <px:PXGridLevel DataMember="GLTranEnq">
        <Columns>
          <px:PXGridColumn DataField="Selected" TextAlign="Center" Type="CheckBox" Width="30px" AllowCheckAll="True" AllowShowHide="Server" CommitChanges="True"></px:PXGridColumn>
          <px:PXGridColumn DataField="Module" Width="100px" ></px:PXGridColumn>
          <px:PXGridColumn DataField="BatchNbr" Width="100px" LinkCommand="ViewBatch" ></px:PXGridColumn>
          <px:PXGridColumn DataField="TranDate" Width="100px" ></px:PXGridColumn>
          <px:PXGridColumn DataField="FinPeriodID" Width="100px" ></px:PXGridColumn>
          <px:PXGridColumn DataField="TranDesc" Width="224px" ></px:PXGridColumn>
          <px:PXGridColumn DataField="RefNbr" Width="100px" LinkCommand="ViewDocument" ></px:PXGridColumn>
          <px:PXGridColumn DataField="LineNbr" TextAlign="Right" Width="100px"  ></px:PXGridColumn>
          <px:PXGridColumn DataField="BranchID" Width="100px" ></px:PXGridColumn>
          <px:PXGridColumn DataField="AccountID" Width="108px" ></px:PXGridColumn>
          <px:PXGridColumn DataField="SubID" Width="198px" ></px:PXGridColumn>
          <px:PXGridColumn DataField="SignBegBalance" TextAlign="Right" Width="100px" ></px:PXGridColumn>
          <px:PXGridColumn DataField="DebitAmt" TextAlign="Right" Width="100px" ></px:PXGridColumn>
          <px:PXGridColumn DataField="CreditAmt" TextAlign="Right" Width="100px" ></px:PXGridColumn>
          <px:PXGridColumn DataField="SignEndBalance" TextAlign="Right" MatrixMode="True" Width="100px" ></px:PXGridColumn>
          <px:PXGridColumn DataField="CuryID"  AllowShowHide="Server" ></px:PXGridColumn>
          <px:PXGridColumn DataField="SignCuryBegBalance" TextAlign="Right" Width="100px" AllowShowHide="Server" ></px:PXGridColumn>
          <px:PXGridColumn DataField="CuryDebitAmt" TextAlign="Right" Width="100px" AllowShowHide="Server" ></px:PXGridColumn>
          <px:PXGridColumn DataField="CuryCreditAmt" TextAlign="Right" Width="100px" AllowShowHide="Server" ></px:PXGridColumn>
          <px:PXGridColumn DataField="SignCuryEndBalance" TextAlign="Right" Width="100px" AllowShowHide="Server" ></px:PXGridColumn>
          <px:PXGridColumn DataField="InventoryID" Width="120px" ></px:PXGridColumn>
          <px:PXGridColumn DataField="ReferenceID" Width="120px" ></px:PXGridColumn>
          <px:PXGridColumn DataField="ReferenceID_BaccountR_AcctName" Width="200px" ></px:PXGridColumn>
          <px:PXGridColumn DataField="ReclassBatchNbr" TextAlign="Right" Width="120px" AllowShowHide="Server" LinkCommand="ViewReclassBatch" ></px:PXGridColumn>
          <px:PXGridColumn DataField="IncludedInReclassHistory" AllowShowHide="False" Visible="false" SyncVisible="false" ></px:PXGridColumn>
          <px:PXGridColumn DataField="UsrLettrageNbr" Width="70" CommitChanges="True" /></Columns>
      </px:PXGridLevel>
    </Levels>
    <AutoSize Container="Window" Enabled="True" MinHeight="400" />
    <ActionBar DefaultAction="DoubleClick" />
  </px:PXGrid>
</asp:Content>

What am I missing ? I spent a few hours on it already and I've ran out of ideas.

Edit:

My end goal is to calculate the sum of the credit and debit for the selected lines on filter view. If you have any workaround to update these values everytime I select a new line, i'll take it.

Maybe with some javascript and a callback command ?


I opened a support ticket on this matter on the acumatica partner center.

Edit 2 :

So, I created my own custom selector :

#region UsrletSel
        [PXBool]
        [PXUIField(DisplayName = "Lettrer")]

        public virtual bool? UsrletSel { get; set; }
        public abstract class usrletSel : IBqlField { }
        #endregion

Then I hid the base selector in aspx, and to keep the original logic I bound the new selector to the base one :

protected void GLTranR_UsrletSel_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
        {
            if (e.Row == null) return;
            var row = (GLTranR)e.Row;
            if(row.GetExtension<GLTranExt>().UsrletSel == true)
            {
                row.Selected = true;
            }
            else
            {
                row.Selected = false;
            }
        }

I set the property CommitChanges=True in aspx for my new field, but i'm still unable to fire any event on this screen.

do you have any idea ?

Edit 3 :

So I totaly randomly got my checkbox (but also the original selected checkbox) to trigger events. You have to double click on the checkbox. (Which doesnt make any sens.) But I can't really tell my customer "start by double clicking if you want your total to calculates".

At 20s http://recordit.co/1fzW3eDIO9

Regards,

解决方案

The final answer was the property "BatchUpdate" was set to "true" on the Grid, which prevents the changes to be commited to the server.

Once you set it to false it works fine :

这篇关于无法在GL404000屏幕上触发fieldupdated或rowupdated事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆