This is a migrated thread and some comments may be shown as answers.

Popup Template trouble

1 Answer 10 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Veteran
Ed asked on 06 Feb 2020, 09:29 AM

Hi,

I am using a custom popup template to add and edit rows on the grid. I can add and modify rows just fine and everything stores to the db the way it's supposed to.

However, I am finding that if I:

1: add a new row via the template

2. hit save,

3. come back to the main grid from the popup template.

4. immediately hit the EDIT button and go back to the template and correct a mistake.

5. hit the save button on the template.

when this sequence is followed the OnPostCreate gets called intead of OnPostUpdate.

It's like it never got out of edit mode.

If I refresh the grid by navigating someplace else and coming back all the data is correct. It's only in this rare instance.

Any ideas?

Thanks … Ed

 

 

1 Answer, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 11 Feb 2020, 09:21 AM

Hi, Ed,

The described behavior is most likely to occur when the data source of the grid is not made aware that a new item was created because of the lack of or the format/content of the create operation response.

The expected response for newly created items is that they are in the exact same format as the read action, one or more  dependent on the Batch() setting and having a unique id which is not of its default value for its type (0 for integer, empty string for string).

  • Can you share with us the grid data source and controller code?
  • Does the response meet the expectations when the create operation is called?
  • Does the custom popup navigate to another View or is it in the same view and using the built-in Update buttons?

Look forward to hearing back from you.

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Get quickly onboarded and successful with Telerik UI for ASP.NET Core with the dedicated Virtual Classroom technical training, available to all active customers.
Tags
Grid
Asked by
Ed
Top achievements
Rank 1
Veteran
Answers by
Alex Hajigeorgieva
Telerik team
Share this question
or