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

Enabling edit of column after checkbox is checked

1 Answer 68 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Adrian
Top achievements
Rank 1
Adrian asked on 15 Jan 2019, 08:39 AM

Hello. I have a problem with grid edit in line.

 

I have defined normal grid, which uses ViewModel.

ViewModel has 3 fields (int A, int B, bool checkbox) 

A field isn't editable by default but whenever I click "edit" I can change B field or check/uncheck checkbox.

I'd like to make field A make editable whenever checkbox is checked by user during edition. So after the checkbox is check A fields is editable.

 

Greetings

1 Answer, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 18 Jan 2019, 09:54 AM
Hi Adrian,

The columns Editable setting of Grid for ASP.NET Core accepts a JavaScript function name. By default, the currently edited dataItem is passed to the method as an argument. Depending on a value within the data item, make the boolean column conditionally editable. More information on this approach can be obtained at the following how-to article:

Make Columns Editable Conditionally

Let me know in case additional clarifications are needed.


Kind regards,
Tsvetomir
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
Adrian
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Share this question
or