Grid inside Dialog

Hi support, i would like to know if it's possible to load a Grid inside a DialogBox control.

This is my dialog defined inside the view:
<div class="control">
    <ej-dialog id="basicDialog" title="Pazienti" is-responsive="true" close="onDialogClose" show-on-init="false"
               enable-modal="true" enable-resize="false" width="800" height="400">
        <e-content-template>
            <ej-grid id="Grid" allow-sorting="true" allow-paging="true" allow-scrolling="true" allow-resizing="true"
                     is-responsive="true" enable-responsive-row="true" action-complete="GridActionComplete"
                     locale="@(System.Threading.Thread.CurrentThread.CurrentCulture.Name)"
                     load="GridLoad" allow-filtering="true">
                <e-datamanager url="/Surgery/Patients/GridPatients" adaptor="WebApiAdaptor"></e-datamanager>
                <e-sort-settings>
                    <e-sorted-columns>
                        <e-sorted-column field="FirstName, LastName" direction="Ascending"></e-sorted-column>
                    </e-sorted-columns>
                </e-sort-settings>
                <e-page-settings page-size="5" show-defaults="true" enable-templates="true" template="#template">
                </e-page-settings>
                <e-columns>
                    <e-column field="Id" visible="false"></e-column>
                    <e-column field="TitleAbbr" header-text="Titolo" header-text-align="TextAlign.Center" text-align="Center" width="50" allow-filtering="false"></e-column>
                    <e-column field="FirstName" header-text="Nome" header-text-align="TextAlign.Center" text-align="Center" width="100"></e-column>
                    <e-column field="LastName" header-text="Cognome" header-text-align="TextAlign.Center" text-align="Center" width="150"></e-column>
                    <e-column field="BirthDate" header-text="Data di Nascita" header-text-align="TextAlign.Center" text-align="Center" width="100" allow-filtering="false"></e-column>
                </e-columns>
            </ej-grid>
        </e-content-template>
    </ej-dialog>
</div>

When i load the dialog no request are started to load the grid. Where i wrong ?

Thanks in advance
Stefano Capobianco

1 Reply

AP Arun Palaniyandi Syncfusion Team April 20, 2018 09:05 AM UTC

Hi Stefano,  
  
Thanks for your interest in Syncfusion products.   
 
Yes, it is possible to load a Grid inside a DialogBox control content template. We have tried to replicate your mentioned issue with your shared code snippets but unfortunately we couldn’t replicate the issue. The Grid control loaded inside Dialog and doesn’t shows any error in rendering. Based on your shared code snippets, we found that you are using WebApi Adaptor to load data to your Grid. So we suspect the issue might be in your WebApi service link and please check whether your service link returns data to your Grid or not?    
 
Hence if you still face any issue means, please let us know the below details. 
 
  • Open your console window and check for any console errors and share the issue screenshot or video, if any?
  • If possible, please use our sample to reproducible your issue sample to validate from our side?
  • What is the Syncfusion version that you are using?
  • Is the Grid control rendered properly separately without rendering it inside Dialog?
  • Do you returning response from your WebApi service?
 
Please find the below sample for your reference. 
 
Please provide the above asked details so that we can provide a solution as earliest.    
 
Regards,
Arun P.
 


Loader.
Up arrow icon