We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

MCV Grid : Access buttons in InlineFormTemplate

Thread ID:

Created:

Updated:

Platform:

Replies:

133023 Oct 4,2017 02:16 PM UTC Oct 9,2017 05:42 AM UTC ASP.NET MVC 5
loading
Tags: Grid
LAID
Asked On October 4, 2017 02:16 PM UTC

Hello,

How to access the save button to InlineFormTemplate (MCV Grid) in order to disable it, in case I doubleclick on row. This allows me to visualize the data of the fields without modification, or there is another solution to see these data in template form
without saving.

and thank you.


Saravanan Arunachalam [Syncfusion]
Replied On October 5, 2017 09:04 AM UTC

Hi Laid, 
Thanks for contacting Syncfusion’s support. 
We understood from your query, you need to disable or remove the save button from the inline template form and we have achieved it by using ActionComplete event of Grid control. In that event, we can either disable or remove the save button as like in the below code example. 
@(Html.EJ().Grid<object>("Editing") 
         . . . 
        .ClientSideEvents(eve => { eve.ActionComplete("complete"); }) 
) 
function complete(args) { 
        if ((args.requestType == "beginedit" || args.requestType == "add")) { 
 
            //Disable the save button from the inline form template 
            $("#InlineEditForm_" + this._id + "_Save").addClass("e-disable"); 
            //If you want to remove the save button from the inline form template 
            $("#InlineEditForm_" + this._id + "_Save").remove(); 
        } 
    } 
 
Regards, 
Saravanan A. 


LAID
Replied On October 5, 2017 02:30 PM UTC

Thank you for your assistance,

Another thing I want to know is how to know that the event beginedit is triggered by RecordDoubleClick Event

if ((args.requestType == "beginedit" || args.requestType == "add")) { 

  if (event triggered by RecordDoubleClick ?? ) 
{
            //Disable the save button from the inline form template 
            $("#InlineEditForm_" + this._id + "_Save").addClass("e-disable"); 
            //If you want to remove the save button from the inline form template 
            $("#InlineEditForm_" + this._id + "_Save").remove();
        }
        }

and thank you for your help.

Saravanan Arunachalam [Syncfusion]
Replied On October 6, 2017 05:14 AM UTC

  
Hi Laid, 
We understood from your query, you need to identify the ActionComplete event with requestType “beginedit” is triggered by the RecordDoubleClick event and we can achieved this requirement by using RecordDoubleClick event of Grid control and please refer to the below code example and api reference link. 
@(Html.EJ().Grid<object>("Editing")  
         . . .  
        .ClientSideEvents(eve => { eve.ActionComplete(“complete”).RecordDoubleClick("onRecordDblClick"); })  
)  
var isRecordDblClick = false; 
function complete(args) {  
        if ((args.requestType == "beginedit" && isRecordDblClick) || args.requestType == "add") {  
  
            isRecordDblClick = false;  
            . . . 
        }  
    }  
function onRecordDblClick (args) {  
         isRecordDblClick = true; 
} 
 
Regards, 
Saravanan A. 
 


LAID
Replied On October 6, 2017 01:11 PM UTC

It works.

I used "e-hide" instead of "e-disable".

Thank you very much for your help & assistance.



Saravanan Arunachalam [Syncfusion]
Replied On October 9, 2017 05:42 AM UTC

Hi Laid,  
Thanks for your update.            
We are happy that the provided information helped you. 
Regards, 
Saravanan A. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;