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. Image for the cookie policy date

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

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






3 Replies

MS Madhu Sudhanan P Syncfusion Team 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 



SA Samuel February 11, 2019 03:52 PM UTC

This was very helpful. Thank you!


MS Madhu Sudhanan P Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon