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.
Unfortunately, activation email could not send to your email. Please try again.

Get ShipName from shipment search

Thread ID:

Created:

Updated:

Platform:

Replies:

127327 Nov 8,2016 02:36 PM Nov 10,2016 02:18 AM ASP.NET Web Forms 3
loading
Tags: Grid
Pratheep
Asked On November 8, 2016 02:36 PM


It's possible get shipname ( add new records or edit existing records) when click  button ( btnsearch have in DialogTemplate -frmship.aspx)   show popup shipment search form (frmshipsearch.aspx)

there (frmshipsearch.aspx) in grid select the shipname that selected shipname want to fill  DialogTemplate ShipName textbox (frmship.aspx) and after select shipname close the popup(frmshipsearch.aspx)


<script type="text/template" id="template">

        <b>Order Details</b>

        <table cellspacing="10">

                <td style="text-align: right;">ShipName

                </td>

                <td style="text-align: left">

                    <input id="ShipName" name="ShipName" class="e-field e-ejinputtext valid"

                        style="width: 116px; height: 28px" value="{{:ShipName}}" />          

                        <button type="button" id="btnsearch" class="btn btn-info">...</button>

 

                </td>

            </tr>

        </table>

    </script>


Thanks
Pratheep
 

Attachment: WebApplication1_7985ab60.rar

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On November 9, 2016 07:48 AM

Hi Pratheep, 

We could see you would like to show a popup with a Grid while clicking the button which is placed inside the dialog editing template. This can be achieved by placing the Grid inside the Dialog at the initial load of the Grid but the Dialog is set to hidden. Therefore, in the button click of dialog editing template, Dialog will be shown along with the Grid. In the RowSelected event of the Popup Grid,  assign the value to the ShipName element and close the dialog. Refer to the following code example. 
  
                    <ej:Dialog ID="Dialog" ClientIDMode="Static" ShowOnInit="false" EnableModal="true" Target="#OrdersGrid" runat="server" Title="SearchGrid"> 
                        <DialogContent> 
 
                            <ej:Grid ID="PopupGrid" AllowPaging="true" runat="server" ClientIDMode="Static"> 
                                <PageSettings PageSize="3" /> 
                                <Columns> 
                                    <ej:Column Field="ShipName" /> 
                                </Columns> 
                                <ClientSideEvents RowSelected="rowSelected" /> 
                            </ej:Grid> 
 
                        </DialogContent> 
                    </ej:Dialog> 
 
                    <ej:Grid ID="OrdersGrid" ClientIDMode="Static" runat="server"> 
                           . . . 
                    </ej:Grid> 
                </ContentTemplate> 
            </asp:UpdatePanel> 
        </div> 
 
 
 
        <script type="text/template" id="template"> 
            <b>Order Details</b> 
            <table cellspacing="10"> 
                       . . . 
                               . . 
                <tr> 
                    <td style="text-align: right;">ShipName 
                    </td> 
                    <td style="text-align: left"> 
                        <input id="ShipName" name="ShipName" class="e-field e-ejinputtext valid" 
                            style="width: 116px; height: 28px" value="{{:ShipName}}" /> 
 
                        <button id="btn" type="button" class="btn btn-info">...</button> 
 
                    </td> 
                </tr> 
            </table> 
        </script> 
        <script type="text/javascript"> 
            function complete(args) { 
                 . . . 
 
                if ((args.requestType == "beginedit" || args.requestType == "add")) { 
                         . . . 
                    $("#btn").ejButton({ 
                        text: "...", 
                        click: function (args) { 
                            $("#Dialog").ejDialog("open"); 
                        } 
                    }) 
                }                } 
            } 
            function rowSelected(args) { 
                $("#ShipName").val(args.data.ShipName).text(args.data.ShipName); 
                $("#Dialog").ejDialog("close"); 
            } 
        </script> 
 

We have modified the sample that can be downloaded from the following location. 


Regards, 
Seeni Sakthi Kumar S. 


Pratheep
Replied On November 9, 2016 04:40 PM

Hi Seeni Sakthi Kumar.

Thank you for your support.working fine

Thanks
Pratheep

Jayaprakash Kamaraj [Syncfusion]
Replied On November 10, 2016 02:18 AM

Hi Pratheep,  
 
We are happy that the problem has been solved. 
 
Please get back to us if you need any further assistance.   
 
Regards,  
 
Jayaprakash K. 


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.

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.

;