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

how to embedded tree grid in dialog

Thread ID:

Created:

Updated:

Platform:

Replies:

149310 Nov 21,2019 01:29 PM UTC Nov 22,2019 04:27 PM UTC JavaScript - EJ 2 1
loading
Tags: TreeGrid
Sarathkumar, K (K.)
Asked On November 21, 2019 01:29 PM UTC

hi expert,

How to embedded tree grid in dialog

<div id="dialog" class="custom-template"></div>
        <div id="dlgContent" style="visibility: hidden" class="dialogContent">
            <div id ="treegrid1"></div>
        </div>
</div>

While using above,some time the tree grid table not displaying within dialog. 

Thanks and Regards
Sarathkumar.k

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On November 22, 2019 04:27 PM UTC

Hi Sarathkumar, 

Thanks for contacting Syncfusion Support. 

We have checked your query and we can render the TreeGrid inside the Dialog component. We can render the TreeGrid using open event of the Dialog and using placed the TreeGrid on the content property of the Dialog. 

Please refer to the code example:- 


<div id="defaultDialog"> 

TreeGrid.Inject(Page); 

    let treegrid: TreeGrid = new TreeGrid( 
       
            dataSource: sampleData, 
            childMapping: 'subtasks', 
            treeColumnIndex: 1, 
            allowPaging: true, 
            height: 500, 
            columns: [ 
                { field: 'taskID', headerText: 'Task ID', width: 70, textAlign: 'Right' }, 
                { field: 'taskName', headerText: 'Task Name', width: 200, textAlign: 'Left' }, 
           
        }); 

let dialogObj: Dialog = new Dialog({ 
        header: 'About SYNCFUSION Tree grid inside Dialog', 
        target: document.getElementById('target'), 
        content: "<div id='TreeGrid'></div>", 
        animationSettings: { effect: 'None' }, 
        showCloseIcon: true, 
        width: '800px', 
        height: '600px', 
        open: dialogOpen, 
    }); 
    dialogObj.appendTo('#defaultDialog'); 

    // 'Open' Button will be hidden, if Dialog is opened 
    function dialogOpen(): void { 
        //document.getElementById('dialogBtn').style.display = 'none'; 
        treegrid.appendTo('#TreeGrid'); 
   


Please get back to us if you need any further assistance. 

Regards, 
Farveen sulthana T 


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.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon