Skip to main content
Answer

Change grid column value

  • October 10, 2023
  • 5 replies
  • 178 views

Forum|alt.badge.img

Hi All,

Need to how to edit grid column value based on another column value and update the cache and enable the save button. 

Thanks

Best answer by palbores

@bhagyat25 you can try this code below. Hope this help.

 protected virtual void _(Events.FieldUpdated<DACName, DACName.verificationMethod> e)
{
var row = e.Row;
if (row == null) return;

if (e.OldValue != e.NewValue)
{
//Code for Update the Verification Note
row.VerificationNote = "";
View.Cache.Update(row);
}
}

 

5 replies

palbores
Jr Varsity I
Forum|alt.badge.img+1
  • Jr Varsity I
  • October 10, 2023

Hi @bhagyat25 Can you please give some more details about your concern?


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • October 10, 2023

Hi @palbores ,

Here is my screen. Based on the Verification method combo value need to update the value of Verification note field. Also need to update the current cache too.

 


palbores
Jr Varsity I
Forum|alt.badge.img+1
  • Jr Varsity I
  • Answer
  • October 10, 2023

@bhagyat25 you can try this code below. Hope this help.

 protected virtual void _(Events.FieldUpdated<DACName, DACName.verificationMethod> e)
{
var row = e.Row;
if (row == null) return;

if (e.OldValue != e.NewValue)
{
//Code for Update the Verification Note
row.VerificationNote = "";
View.Cache.Update(row);
}
}

 


Forum|alt.badge.img
  • Author
  • Jr Varsity II
  • October 10, 2023

Hi @plabarre ,

Your code is running infinitely. 

if (e.OldValue != e.NewValue)


palbores
Jr Varsity I
Forum|alt.badge.img+1
  • Jr Varsity I
  • October 10, 2023

@bhagyat25 if it is, you can remove the if statement. Just like the code below.

protected virtual void _(Events.FieldUpdated<DACName, DACName.verificationMethod> e)
{
var row = e.Row;
if (row == null) return;

//Code for Update the Verification Note
row.VerificationNote = "";
View.Cache.Update(row);
}