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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Activate dialogue edit on row double click and activate inline edit on column action edit click

Thread ID:

Created:

Updated:

Platform:

Replies:

142568 Feb 11,2019 01:43 AM UTC Feb 11,2019 05:12 PM UTC JavaScript - EJ 2 3
loading
Tags: Grid
Samuel
Asked On February 11, 2019 01:43 AM UTC

Hi , 
How do you make it such that activate dialogue edit on row double click and activate inline edit on column action edit click






Madhu Sudhanan P [Syncfusion]
Replied On February 11, 2019 12:21 PM UTC

Hi Samuel, 

Thanks for contacting Syncfusion support. 

It is not possible to use in-built dialog and inline edit in same grid. However we can show dialog by extending the edit renderer module as below. 


    var grid = new ej.grids.Grid({ 
        ... 
        editSettings: { ... mode: 'Inline' }, 
        .... 
 
        beginEdit: function(args) { 
          args.row.classList.add('e-dlgeditrow') 
        } 
    }); 
     
    var dbClick = false; 
    grid.on('dblclick', function() { dbClick = true; }); 
 
    grid.appendTo('#Grid'); 
     
    var dialogRenderer = new grid.editModule.renderer.editType.Dialog(grid, grid.serviceLocator); 
     
    grid.editModule.renderer = ej.base.extend(grid.editModule.renderer, { 
      update: function(args) { 
        if (dbClick) { 
           
          dbClick = false; 
           
          dialogRenderer.update(this.getEditElements(args), args); 
           
          this.parent.setProperties({ 
            editSettings: { mode: 'Dialog'} 
          }, true); 
 
        } else { 
          this.renderer.update(this.getEditElements(args), args); 
          this.parent.setProperties({ 
            editSettings: { mode: 'Normal' } 
          }, true); 
        } 
         
        this.convertWidget(args); 
      } 
    }); 


   

Regards, 
Madhu Sudhanan P 


Samuel
Replied On February 11, 2019 03:52 PM UTC

This was very helpful. Thank you!

Madhu Sudhanan P [Syncfusion]
Replied On February 11, 2019 05:12 PM UTC

Hi Samuel, 
Thanks for the update. Please get back to us if you need further assistance. 
Regards, 
Madhu 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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.

;