how to call a bootstrap modal from a row click event in data grid

I want to call a Bootstrap modal when a row is clicked to be edited, a bootstrap modal should open with the data of which the row was clicked.
 


1 Reply 1 reply marked as answer

SK Sujith Kumar Rajkumar Syncfusion Team June 22, 2020 12:14 PM UTC

Hi Hrithik, 
 
Greetings from Syncfusion support. 
 
You can get the selected row data in the Grid’s rowSelected event handler as demonstrated in the below code snippet, 
 
<ejs-grid id="Grid" rowSelected="rowSelected"></ejs-grid> 
 
// Grid’s rowSelected event handler 
function rowSelected(args) { 
        console.log("Row data: " + JSON.stringify(args.data)); 
} 
 
 
The data will be returned in arguments as in below image, 
 
 
 
So you can use this event to append the current selected row data to the bootstrap model you have rendered. 
 
 
Please get back to us if you require any further assistance. 
 
Regards, 
Sujith R 


Marked as answer
Loader.
Up arrow icon