Hide field in popup

1 Answer 27 Views
Grid
Amjad
Top achievements
Rank 1
Amjad asked on 12 Sep 2025, 02:44 PM
How do I hide a field in the standard popup window when Add button is clicked?

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 16 Sep 2025, 02:27 PM | edited on 16 Sep 2025, 02:28 PM

Hello Amjad,

The following example shows how this can be achieved: https://blazorrepl.telerik.com/mfuXPgFI22CtIgay37 

Note that the Quantity field is visible in the Edit popup, but not in the Add popup. 

The approach requires using a FormTemplate, in which you can check whether the popup is for adding a new record or for editing an existing record. This information is available in the template through the context: formContext.IsNew

Then you can add conditional logic to the template, so that the respective field shows only in the Edit popup and remains hidden in the Add popup. 

Regards,
Ivan Danchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Amjad
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or