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.

Can't make DateTime fields not editable

Thread ID:





128599 Jan 31,2017 08:17 AM Feb 3,2017 05:09 AM ASP.NET Core 4
Tags: Grid
Asked On January 31, 2017 08:17 AM


Tried multiple combinations of these but always it gives me an editable datepicker
Two of my columns show read only fields that are set by server and user should only see them I can't make them readonly

Replied On January 31, 2017 08:18 AM

Field is col.Field(model => model.Date)

Venkatesh Ayothi Raman [Syncfusion]
Replied On February 1, 2017 03:43 AM

Hi Customer, 
Thanks for contacting Syncfusion support. 
This issue happens when we enable both AllowEditing(false) and EditType properties in Grid. This is not recommended way and we suggest you to disable the AllowEditing property for date column like as follows, 
Code example
         . . . 
        .Columns(col => 
            .. . 
            col.Field("OrderDate").HeaderText("Order Date").AllowEditing(false).Format("{0:MM/dd/yyyy}").Add(); 

Please refer to the Help documentation for more information, 

If you still face the same issue, then could you please provide following information? 
1)      Share the Grid code example. 
2)      Essential Studio version details. 
3)      Any script error thrown in console window while editing? 
Venkatesh Ayothiraman. 

Replied On February 1, 2017 09:28 AM

 .Columns(col =>
            col.Field(x => x.Id).IsPrimaryKey(true).IsIdentity(true).Add();
            col.Field(x => x.Name).Add();
            col.Field(x => x.Country).Add();
            col.Field(x => x.State).Add();
            col.Field(x => x.CreatedDate).AllowEditing(false).Add();
            col.Field(x => x.LastModifiedDate).AllowEditing(false).Add();

CreatedDate is still editable

Venkatesh Ayothi Raman [Syncfusion]
Replied On February 3, 2017 05:09 AM

Hi Customer,  
We considered this requirement “AllowEditng property is not working correctly for Datetimepicker column” as bug and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.  
Venkatesh Ayothiraman. 


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.