Show dialog when hover row

Hi, have a nice day! I want to show dialog when I hovering over any row. Can you help me?


3 Replies

SK Sujith Kumar Rajkumar Syncfusion Team August 26, 2021 11:17 AM UTC

Hi Toan, 
 
Greetings from Syncfusion support. 
 
Based on the query we could understand that your requirement is to show dialog on each Grid row hover. You can achieve it by following the below steps, 
 
Initially, render the EJ2 Dialog with the required properties and set its ‘visible’ property as ‘false’ in order to hide it on initialization. 
 
<ejs-dialog #dialog id='dialog' [visible]='false' isModal='true' header="Header area" content="Content area" showCloseIcon="true" target='#dialog-target' width='300px'> 
</ejs-dialog> 
 
Then bind ‘mouseover’ event to the Grid and here show the initialized EJ2 Dialog by calling its ‘show’ method. 
 
@ViewChild('dialog') dialogInstance: DialogComponent; 
 
// Grid’s ‘mouseover’ event handler 
mouseOver(args) { 
     // The EJ2 Dialog is shown 
    this.dialogInstance.show(); 
} 
 
We have prepared a sample based on this for your reference. You can find it below, 
 
 
More details on the EJ2 Dialog can be checked in the below documentation link, 
 
 
 
Please get back to us if you require any further assistance. 
 
Regards, 
Sujith R 



TB Toan Bui August 27, 2021 02:37 AM UTC

I did it. Thank you so much!



SK Sujith Kumar Rajkumar Syncfusion Team August 27, 2021 06:42 AM UTC

Hi Toan, 
 
You’re welcome. We are glad to hear that your query has been resolved. 
 
Regards, 
Sujith R 


Loader.
Up arrow icon