- Home
- Forum
- ASP.NET Web Forms
- Get ShipName from shipment search
Get ShipName from shipment search
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
SIGN IN To post a reply.
3 Replies
SS
Seeni Sakthi Kumar Seeni Raj
Syncfusion Team
November 9, 2016 12:48 PM UTC
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.
PR
Pratheep
November 9, 2016 09:40 PM UTC
Hi Seeni Sakthi Kumar.
Thank you for your support.working fine
Thanks
Pratheep
Thank you for your support.working fine
Thanks
Pratheep
JK
Jayaprakash Kamaraj
Syncfusion Team
November 10, 2016 07:18 AM UTC
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.
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
PR Pratheep
- Nov 8, 2016 07:36 PM UTC
- Nov 10, 2016 07:18 AM UTC