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

How to get the <ej:DateTimePicker> control to work inside an External Form Template

Thread ID:





131307 Jul 3,2017 02:28 PM UTC Jul 4,2017 04:44 PM UTC ASP.NET Web Forms 1
Tags: Grid
Asked On July 4, 2017 01:46 PM UTC

Hi,I have created a SyncFusion ASP.net project in Visual Studio 2017 with  .net version as 4.6.1. I then copied the grid code from the page http://localhost:17852/grid/externalformonlocaldata.aspx and all worked ok. Then, i tried to add the following line of code to the externalformtemplate to add a datetimepicker Date testingBut the datetime picker control is not appeating and it is only appearing as a text input box. There is also some JS error in the browser.. GridWithExternalTemplateAndUserControl:168 Uncaught TypeError: $(...).ejPropertiesPanel is not a function    at HTMLDocument. (GridWithExternalTemplateAndUserControl:168)    at c (jquery-1.10.2.min.js:21)    at Object.fireWith [as resolveWith] (jquery-1.10.2.min.js:21)    at Function.ready (jquery-1.10.2.min.js:21)    at HTMLDocument.q (jquery-1.10.2.min.js:21)Can someone help me?

Thavasianand Sankaranarayanan [Syncfusion]
Replied On July 4, 2017 04:44 PM UTC

Hi Sathish, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and we suspect that you want to render the ejDateTimePicker control in the external form template rendering. So, we suggest you to use the actionComplete event of ejGrid control to render the input text box as ejDateTimepicker. 

Refer the below code example. 

<ej:Grid ID="FlatGrid" runat="server" AllowSorting="True" AllowPaging="True" > 
             <ClientSideEvents ActionComplete="complete"  /> 
              <EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True" EditMode="ExternalFormTemplate" ExternalFormTemplateID="#template"> 
                <ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="True" TextAlign="Right" Width="75" /> 
                <ej:Column Field="OrderDate" HeaderText="Order Date" TextAlign="Right" Width="80" Format="{0:MM/dd/yyyy hh:mm:ss}" /> 
                <ej:Column Field="Freight" HeaderText="Freight" TextAlign="Right" Width="75" Format="{0:C}"  /> 
<script type="text/template" id="template"> 
        <table cellspacing="10"> 
                     <td>Order ID</td> 
                           <input id="OrderID" name="OrderID" disabled="disabled" value="{{:OrderID}}" class="e-field e-ejinputtext" style="width:116px;height:28px" /> 
                     <td>Ordre Date</td> 
                           <input type="text" id="OrderDate" name="OrderDate" value="{{:OrderDate}}" /> 
                           <input type="text" id="Freight" name="Freight" value="{{:Freight}}" /> 

<script type="text/javascript"> 
       function complete(args) {    
           $("#OrderDate").ejDateTimePicker();// to render the normal input text box as ejDateTimePicker 

We have prepared a sample and it can be downloadable from the below location. 

Refer the help documentation. 

If we misunderstood your query then please get back to us. 

Thavasianand S. 


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