This is a migrated thread and some comments may be shown as answers.

Grid Editing -- Yes for Create, No for Edit

2 Answers 109 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 21 Aug 2019, 09:02 PM

Is there a way to make a column cell in the grid editable when the user clicks the create button on the toolbar but to make the same column cell read only when the user tries to edit the record?  I want the user to be able to add new records but not be able to change the values in a specific field when editing the row.

I can use the beforeEdit function to determine if it is in new or update state but not sure what to do from here.

function beforeEdit(e) {
        if (!e.model.isNew()) {
            alert("Edit");
        }
        else {
            alert("New");
        }
    }

I am using Visual Studio 2017, Net Core 2.1 Telerik 2019.2.619

Thanks.

Rich

2 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 22 Aug 2019, 03:18 PM

I found the answer I needed at the link below:

https://www.telerik.com/forums/column-readonly-in-edit-mode-but-editable-in-add-mode-

 

0
Nikolay
Telerik team
answered on 26 Aug 2019, 01:59 PM
Hello Richard,

I am glad to hear you managed to resolve the situation. 

Indeed, the answers posted in the Kendo UI forum are public so all members of the community can benefit.

If there is anything else, we could help with, please contact us back.
 
Regards,
Nikolay
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or