Update a textbox in a Template form edit when a checkbox is ticked

I have a Grid with a custom (Template) edit form.

Among other things, I have a bound checkbox and a bound Notes field.

EditForm.png

When I click on the checkbox (1), I want to add a note in the textbox (2).

I was able to create code using ValueChange to set the value of the note, but it doesn't show up immediately. I have to click Save and then edit the row again to see the note.

How can I make the note show up in the textbox as soon as the checkbox is checked?


1 Reply

RS Renjith Singh Rajendran Syncfusion Team February 2, 2022 10:23 AM UTC

Hi Keith, 
 
Greetings from Syncfusion support. 
 
We suggest you to check this scenario by setting PreventRender as false in the OnActionComplete event handler based on RequestType as Add/BeginEdit. Please refer and add the codes below, 
 
 
<GridEvents OnActionComplete="OnActionComplete" ... TValue="Orders"></GridEvents> 
 
public void OnActionComplete(ActionEventArgs<Orders> args){    if (args.RequestType.Equals(Action.Add) || args.RequestType.Equals(Action.BeginEdit))    {        //based on Add or Edit action disable the PreventRender        args.PreventRender = false;    }}
 
Reference :  
 
Please get back to us if you need further assistance. 
 
Regards, 
Renjith R 
 


Loader.
Up arrow icon