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

[Solved] Client side edit mode detection

3 Answers 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marcin
Top achievements
Rank 1
Marcin asked on 30 Jun 2011, 04:47 PM
Hi,

How to detect on client-side if the grid is in edit mode? I have a grid which in display mode provides a details view after row-click action. But I want to prevent redirecting to details when grid is in edit mode. I'm using some date pickers in my edit template and sometimes click event is captured by grid and then it redirects the user to the details page.

Thanks in advance for any advices.
Best regards,
Marcin

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 01 Jul 2011, 06:41 AM
Hi Marcin,

 You can check for the existence of the edit form:

if ($(".t-edit-form").length) {

}

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Marcin
Top achievements
Rank 1
answered on 21 Jul 2011, 08:32 AM
Hi Atanas,

Thanks for your reply. It works but only once.. after first edit the condition still is true, even when the grid isn't in the edit mode longer. Any ideas? Thanks in advance.

Best regards,
Marcin
0
Atanas Korchev
Telerik team
answered on 21 Jul 2011, 08:49 AM
Hello Marcin,

 Then you can check for the presence of an update command:

if ($(".t-grid-update").length) {

}


All the best,
Atanas Korchev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Grid
Asked by
Marcin
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Marcin
Top achievements
Rank 1
Share this question
or