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

Grid not showing in dialog control

Thread ID:

Created:

Updated:

Platform:

Replies:

117325 Sep 27,2014 12:42 PM UTC Oct 20,2014 01:47 PM UTC ASP.NET Web Forms 7
loading
Tags: Grid
Roimer Machacón Otero
Asked On September 27, 2014 12:42 PM UTC

Hi, we're using the dialog control, inside this we need show a grid control when the dialog be launched for a button in a page, Now inside the dialog exist another controls (label, buttons) and these show correctly but the grid not working is rendered as div

Mohammed Farook J [Syncfusion]
Replied On September 29, 2014 12:52 PM UTC

Hi Nestor,

Thanks for using Syncfusion products,


We have analyzed your requirement , we afraid that we are unable to reproduce the reported issue. Please find the code snippet.

 

<ej:Dialog ID="dilog" Width="700"  Title="Custom control" runat="server">

        <DialogContent>

               <ej:Button ID="btn" Width="130" Size="Medium" runat="server" Text="ejButton">ej:Button>

 

                <label id="lbl"> labellabel>

 

              <ej:Grid ID="EmployeesGrid" runat="server" DataSourceID="ObjectData" AllowPaging="true">

             <Columns>

                             

                <ej:Column Field="EmployeeID" HeaderText="Employee ID" Width="40" />

                <ej:Column Field="FirstName" HeaderText="First Name" TextAlign="Right" Width="50" />              

                 <ej:Column Field="LastName" HeaderText="LastName" TextAlign="Right" Width="50" />

                            Columns>

                 ej:Grid>

                      DialogContent>    

                           ej:Dialog>

 

For your convenience we have attached a sample and the same can be downloaded from the link:

 

Sample :

 

http://www.syncfusion.com/downloads/support/directtrac/130151/Sample774628453.zip

 

If you are still face the same issue, please send your sample or modify the above attached sample.

 

Please let us know if you have any queries.

 

Regards,

 

J.Mohammed Farook 


Roimer Machacón Otero
Replied On October 15, 2014 10:53 PM UTC

Hi the example work correctly but the problem occurs when the dialog is called in a asp:button / asp:linkbutton in a web form.

The user press the button and with this show the dialog with the grid included with data.

Can you send me an example with this functionality?

Mohammed Farook J [Syncfusion]
Replied On October 16, 2014 02:59 PM UTC

Hi Nestor,

We have analyzed your requirement , we afraid that we are unable to reproduce the reported issue. please check the sample.

 

Sample : Sample.zip

 

If you are still face the same issue, please send your sample or modify the above attached.

 

Note:  sorry for the inconvenience caused , We have misunderstood your query please explain briefly.

 

Please let us know if you have any queries.

Regards,

J.Mohammed Farook


Roimer Machacón Otero
Replied On October 16, 2014 03:40 PM UTC

The example work, but we are request this:

We have a button in a form, when the client press the button for way javascript show the dialog that include the grid (load the information of the grid for ajax). All this for avoid go to the server, only connect to the server in the ajax method for bring the data.

Mohammed Farook J [Syncfusion]
Replied On October 17, 2014 06:37 PM UTC

Hi Nestor,

Based on your request , we have created a sample   when clicked the asp button  the “ejDialog with inside the grid”. Please find the code snippet.

 

Please set return false to stop postback when click the button.

<asp:Button  ID="btn1" OnClientClick="cle(); return false;" text="click me"  runat="server" />

 

   <div id="Diglog">

        <div id="grid"></div>

    </div>

   

 

    <script src="Scripts/jsondata.min.js"></script>

    <script type="text/javascript">

        function cle(e) {

            $("#Diglog").ejDialog(

               {

                   enableModal: true,

                   enableResize: false,

                   width: 300,

                   close: "onDialogClose"

               });

            $("#grid").ejGrid({

                dataSource: window.gridData,

                allowScrolling: true,

                columns: [

                    { field: "OrderID" },

                    { field: "CustomerID" },

                    {field:"EmployeeID"}

                ]

            })

           

            return false;

        }

    

 

</script>

</asp:Content>

 

 

 

For your convenience we have attached a sample and the same can be download from the link.

 

 

Sample: Sample1.zip

 

Please let us know if you have any queries.

 

Regards,

 

J.Mohammed Farook


Roimer Machacón Otero
Replied On October 17, 2014 10:30 PM UTC

Hi Mohammed 

We are using the example and this only work one time. When the button is pressed for first time in the page this work, then the user close the dialog, when this press the button again this not fire the dialog

Mohammed Farook J [Syncfusion]
Replied On October 20, 2014 01:47 PM UTC

Hi Nestor,

 

Sorry for the inconvenience caused.

 

We have analyzed your requirement and we have created a sample  when click the asp button “ ejDialog opened and its inside the Grid with included a data  ”. please find the code snippet.

 

The button  OnClientClick="cle(); return false;" is stop the post back to the server.

 

<asp:Button  ID="btn1" OnClientClick="cle(); return false;" text="click me"  runat="server" />

   

    <div id="Diglog">

        <div id="grid"></div>

    </div>

   

 

    <script src="Scripts/jsondata.min.js"></script>

    <script type="text/javascript">

        var count = 1;

        function cle(e) {

           

           

            if (count > 1) {

 

                $("#Diglog").ejDialog("open") // set model call

            }

            else {

                $("#Diglog").ejDialog(

                       {

                           enableModal: true,

                           enableResize: false,

                           width: 300,

                           close: "onDialogClose"

                       });

                

                $("#grid").ejGrid({

                    dataSource: window.gridData,

                    allowScrolling: true,

                    columns: [

                        { field: "OrderID" },

                        { field: "CustomerID" },

                        { field: "EmployeeID" }

                    ]

                })

            }

                count += 1;

        

        }

    

 

</script>

</asp:Content>

 

 

For your convenience we have attached a sample and the same can be downloaded from the link.

 

Sample :     Samplepostbackstop.zip

 

Please let us know if you have any queries.

 

Regards,

J.Mohammed Farook


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.

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

;