Hi njenga, Always destroy the existing jqxGrid if it was initialized previously, otherwise memory leaks or rendering issues can occur. You can keep a simple #windowContent container and append dynamic grid placeholders like #newGrid inside it each time. $("#grid_main").on('cellclick', function (event) { // Clear previous content $("#windowContent").jqxGrid('destroy'); // If a jqxGrid exists, destroy it $("#windowContent").empty(); // Remove all HTML content // Optionally: recreate a placeholder div for the new grid $("#windowContent").append(''); // Create a new jqxGrid based on the clicked cell $("#newGrid").jqxGrid({ width: 600, source: getNewDataAdapter(event), // Your custom function columns: [ { text: 'Name', datafield: 'name' }, { text: 'Age', datafield: 'age' } ] }); // Open the jqxWindow $("#myWindow").jqxWindow('open'); });
Regards, Peter jQWidgets Team https://www.jqwidgets.com/