Handle request editing cell to call partial view instead of this.

In my grid i have added edit button for grid. I want to handle clicking this button to call ajax script which returning my partial view. My partial view is returning well. However in grid the selected record makes editable. How to disable this to call only ajax script wihout enabling editing mode in grid?

1 Reply

PK Prasanna Kumar Viswanathan Syncfusion Team November 10, 2017 12:36 PM UTC

Hi Customer, 

Thanks for contacting Syncfusion support.  

To avoid editable for the selected record, use actionBegin event of ejGrid. The actionBegin event will be triggered for every grid action before its starts. In this event we need to check the condition with the requestType as “beginedit” and define args.cancel as true to avoid the default operations(edit operation). 

Find the code example:  


$("#Grid").ejGrid({ 
                // the datasource "window.gridData" is referred from jsondata.min.js 
                dataSource: window.gridData, 
                allowPaging: true, 
                actionBegin : function (args) { 
                  if(args.requestType == "beginedit") 
                    args.cancel = true; 
                }, 


Refer to the Help document for the actionBegin event.  


If we misunderstood your query, please get back to us  

1. Code example of a Grid.  

2. Code example of button added in Grid.  

3. Essential Studio Version details.  

Regards, 
Prasanna Kumar N.S.V 
 


Loader.
Up arrow icon