Smartpanel文字不会刷新 [英] Smartpanel text do not refresh

查看:62
本文介绍了Smartpanel文字不会刷新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在自定义智能面板上显示了几个文本框。要显示的文本是通过单击网格中的每一行获得的,并显示在smartpanel上。

I am displaying few textboxes on my custom smartpanel. The text to display is obtained by clicking each row in the grid and showed on smartpanel.

但是,问题是,无论何时我第一次单击任一行,它都能正确显示所有文本正确,但是下一次以后,它仍然显示上一个,并且不会刷新。

However, the issue is whenever I click on first time any row, it displays correctly all text correctly but next time onwards it still shows the previous one and do not get refreshed.

这是我正在使用的代码-

Here is the code I am using-

public PXSelect<CRAcumaticaActivity,
        Where<CRAcumaticaActivity.activityID, Equal<Current<CRAcumaticaActivity.activityID>>>> CurrentAcuViewActivity;

public PXAction<CRCase> acuViewActivity;

    [PXButton(ImageKey = PX.Web.UI.Sprite.Main.ArrowUp, CommitChanges = false)]
    [PXUIField(DisplayName = "View Activity", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
    protected virtual IEnumerable AcuViewActivity(PXAdapter adapter)
    {
        CurrentAcuViewActivity.AskExt();

        return adapter.Get();
    }

这是smartpanel aspx代码-

Here is the smartpanel aspx code-

<px:PXSmartPanel ID="pnlAcuViewActivity" runat="server" Style="z-index: 108;"
    Caption="Acumatica Activity" CaptionVisible="True" LoadOnDemand="true"
    ShowAfterLoad="true" AutoCallBack-Command="Refresh"  Key="CurrentAcuViewActivity"
    AutoCallBack-Target="frmAcuViewActivity" DesignView="Content"
    AcceptButtonID="PXButtonOK" CancelButtonID="PXButtonOK">
    <px:PXFormView ID="frmAcuViewActivity" runat="server" DataSourceID="ds"  DataMember="CurrentAcuViewActivity"
        Style="z-index: 100"
        Caption="Acumatica Activity" CaptionVisible="False"
        SkinID="Transparent" TabIndex="17100">
        <Template>
            <px:PXLayoutRule runat="server" StartRow="True">
            </px:PXLayoutRule>
            <px:PXTextEdit ID="edSummary" runat="server" DataField="Summary" Enabled="false">
            </px:PXTextEdit>
            <px:PXRichTextEdit ID="edDescription" runat="server" DataField="Description" Height="200px" Width="500px">
            </px:PXRichTextEdit>
        </Template>
    </px:PXFormView>
    <px:PXPanel ID="PXPanel1" runat="server" SkinID="Buttons">
        <px:PXButton ID="pxBtnOK" runat="server" DialogResult="OK" Text="Close" />
    </px:PXPanel>
</px:PXSmartPanel>

有什么我想念的东西吗?请提出建议。

Is there anything I am missing. Please suggest.

推荐答案

对于您的智能面板,为什么要使用:
ShowAfterLoad,
AutoCallBack- * ,并且
AcceptButtonID / CancelButtonID设置为同一按钮?

For your smartpanel, why do you have: ShowAfterLoad, AutoCallBack-*, and AcceptButtonID/CancelButtonID set to same button?

ShowAfterLoad属性控制面板加载期间的显示。 AutoCallBack属性适用于面板上的控件所生成的任何回调

ShowAfterLoad property controls the display during loading of the panel. AutoCallBack properties apply to any callback generated by controls on the panel

我建议将您的smartpanel声明如下:注意,AutoRepaint属性会强制面板每次重新绘制自身打开。

I suggest to have your smartpanel declared as follows: Note, AutoRepaint property which forces the panel to repaint itself everytime it opens.

<px:PXSmartPanel ID="pnlAcuViewActivity" runat="server" Style="z-index: 108;"
Caption="Acumatica Activity" CaptionVisible="True" LoadOnDemand="true"
 Key="CurrentAcuViewActivity"
AcceptButtonID="PXButtonOK" 
AutoRepaint="true">

我能想到的另一件事是,您应确保不要在相同的数据视图中使用相同的数据视图一个容器。

The other thing I can think of is you should ensure not to use the same data view in more than one container.

这篇关于Smartpanel文字不会刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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