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

How can I determine if a RadDataForm is in edit mode from client side JavaScript?

3 Answers 110 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 04 Mar 2020, 06:15 PM

I can determine if a RadDataForm Is in Insert mode with code like this:

if ($find("<%= frmClaim.ClientID %>")._isItemInserted) { ...

 

 

 

But how can I determine if a RadDataForm is in edit mode from client side JavaScript?

3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 09 Mar 2020, 01:12 PM

Hi Richard,

The DataForm does not provide API for getting the current Edit mode of the Item, but you can determine it depending on the visibility of the Edit element in a similar way:

if ($find("<%= frmClaim.ClientID %>")._Edit.style.display != "none") { ...

Regards,
Vessy
Progress Telerik

Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
0
Richard
Top achievements
Rank 1
answered on 10 Mar 2020, 03:41 PM
The portion the portion "$find("<%= frmClaim.ClientID %>")" returns a value, but "$find("<%= frmClaim.ClientID %>")._Edit" seems to return null regardless of if the data form is in edit mode. 


0
Vessy
Telerik team
answered on 11 Mar 2020, 01:24 PM

Hi Richard,

Can you, please, share the exact version of the controls that you are using in your application? can you also send me a sample page where I can examine the exact DataForm setup and see what might prevent you to access the API of the control?

Regards,
Vessy
Progress Telerik

Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
Tags
DataForm
Asked by
Richard
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Richard
Top achievements
Rank 1
Share this question
or