Solved

Unable to bind the data to selected row.

  • 18 January 2022
  • 5 replies
  • 288 views

Userlevel 2
Badge

Hi Guys,

We are not able to bind the data. while selecting a specific row To Html Editor(PXRichTextEdit) Form.

Plz, Get me out of this Puzzle.

 

Thanks

 

 

icon

Best answer by Django 18 January 2022, 18:34

View original

5 replies

Userlevel 7
Badge +17

Hi @NageswaraRaoAddanki60  Can you please share your code here.

Userlevel 2
Badge

Hi @NageswaraRaoAddanki60  Can you please share your code here.

  Okay,

Here is My Graph 

 public class SSPAgreeTemplateMaint : PXGraph<SSPAgreeTemplateMaint, SSPAgreeTemplate>

    {

        public SelectFrom<SSPAgreeTemplate>.View AgreeTemplates;

        public SelectFrom<SSPAgreeTemplateSection>.Where<SSPAgreeTemplateSection.templateID.IsEqual<SSPAgreeTemplate.templateID.FromCurrent>>.View AgreeTemplateSections;

        public SelectFrom<SSPAgreeSection>.View SSPAgreeSectionDataView;

        #region Event Handlers

        protected void SSPAgreeTemplateSection_SectionID_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)

        {

            var row = (SSPAgreeTemplateSection)e.Row;

            SSPAgreeSection sPAgreeSection =

            SelectFrom<SSPAgreeSection>.

            Where<SSPAgreeSection.sectionID.IsEqual<@P.AsInt>>.

                View.Select(this, row.SectionID);

            if (sPAgreeSection != null)

            {

                if (row.OverrideStd != true)

                {

                    row.Descr = sPAgreeSection.Descr;

                    row.NoteHtml = sPAgreeSection.NoteHtml;

                }

            }

        }

        protected void SSPAgreeTemplateSection_RowUpdating(PXCache cache, PXRowUpdatingEventArgs e)

        {

            var row = (SSPAgreeTemplateSection)e.Row;

            if (row.NoteHtml == null)

            {

                SSPAgreeSection sPAgreeSection =

               SelectFrom<SSPAgreeSection>.

               Where<SSPAgreeSection.sectionID.IsEqual<@P.AsInt>>.

               View.Select(this, row.SectionID);

                if (sPAgreeSection != null)

                {

                   

                    row.NoteHtml = sPAgreeSection.NoteHtml;

                }

            }

        }

        #endregion

    }

Userlevel 7
Badge +5

Have you set the master grid set SyncPosition property to true?  It seems like the bottom field isn’t away that the grid record has changed.

While you don’t have a detail grid, it’s almost acting like that.  If SyncPosition doesn’t sort it out, have a look at this post:

https://stackoverflow.com/questions/49264233/how-to-create-master-detail-grids-in-acumatica

Userlevel 2
Badge

Have you set the master grid set SyncPosition property to true?  It seems like the bottom field isn’t away that the grid record has changed.

While you don’t have a detail grid, it’s almost acting like that.  If SyncPosition doesn’t sort it out, have a look at this post:

https://stackoverflow.com/questions/49264233/how-to-create-master-detail-grids-in-acumatica

  Hi @ddunn 
      I have tried This Scenario. But, it doesn’t work.

      I Need  to bind grid field data to form field, Whenever I  select the grid record .
Thanks.

Userlevel 2

You can try to use AllowFormEdit property of the top grid. It will add grid toolbar action “Pencil” that will allow toggling between grid and form view.  

And in the RowTemplate use PXRichTextEdit control it will be bound to the same field .

In this case you do not need rich text edit control at the bottom. 

Please see for example SO301000 screen. 

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved