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

Enable or disable a daterimpicker in grid

Thread ID:





128847 Feb 13,2017 12:20 AM UTC Feb 14,2017 01:21 PM UTC ASP.NET Core 3
Tags: Grid
franco perduca
Asked On February 13, 2017 12:20 AM UTC

How is possibile via javascript to enable or disable a datetimepicker  in column in a grid ?
Thank you for your support

Jayaprakash Kamaraj [Syncfusion]
Replied On February 13, 2017 10:38 AM UTC

Hi Franco, 

Thank you for contacting Syncfusion support. 

We have achieved your requirement using actioncomplete event of ejGrid. In this we can disable/enable dateTimePicker using enable/disable method of ejDateTimePicker. Please refer to the below help document,  code example and sample. 

<ej-grid id="GridContainer" 
         datasource="ViewBag.data" action-complete="actioncomplete" 
       <e-column field="CustomerID" header-text="CustomerID" /> 
        <e-column field="EmployeeID" header-text="EmployeeID" /> 
        <e-column field="OrderDate" header-text="OrderDate" type="datetime" edit-type="DateTimePicker" /> 
<script type="text/javascript"> 
    function actioncomplete(args) { 
        if (args.requestType == "beginedit") { 
            if (args.rowData.EmployeeID == 2) 
                $("#GridContainerOrderDate").ejDateTimePicker("disable"); // here we have disbaled dataTimePicker 
                $("#GridContainerOrderDate").ejDateTimePicker("enable"); // here we have enabled dataTimePicker 

If we have misunderstood your requirement, then please share more details about your requirement it will help us to provide the prompt solution                                                                              


Jayaprakash K. 

franco perduca
Replied On February 13, 2017 07:57 PM UTC

Thank you it works!!!!

ps there same mistake in you doc

the param is args.rowData not args.row 

correct ?

Thank you

Jayaprakash Kamaraj [Syncfusion]
Replied On February 14, 2017 01:21 PM UTC

Hi Franco 
In actionComplete event we will get args.row and args.rowData. 
args.row => Returns the current edited row. 
args.rowData = >  returns the Record object (JSON). 
We have modified our UG documentation for the particular event(actionComplete) and it will be published shortly. We will let you once it is refreshed online. 
Jayaprakash K.   


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