<ej-grid id="GridContainer" allow-resize-to-fit="true" allow-sorting="true" allow-text-wrap="true" allow-paging="true" is-responsive="true" datasource="ViewBag.data" action-complete="actioncomplete" enable-responsive-row="true"> ……………… <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" /> </e-columns> </ej-grid> <script type="text/javascript"> function actioncomplete(args) { if (args.requestType == "beginedit") { if (args.rowData.EmployeeID == 2) $("#GridContainerOrderDate").ejDateTimePicker("disable"); // here we have disbaled dataTimePicker else $("#GridContainerOrderDate").ejDateTimePicker("enable"); // here we have enabled dataTimePicker } } </script> |