I have a kendo grid with data in it and multiple columns (say col 1, 2, and 3). Columns 1, 2, 3 need to be able to be edited (or preventing editing) based off the values of each other. This is row specific.
For instance, if column 1 (date) is < column 2 (date) then column 3 is not allowed to be edited.
I know it's simple enough to disable or enable an entire column but my requirements are row specific. So row 1 could have column 3 enabled and row 2 could have column 3 disabled.
Any thoughts?
Keep it simple just use (Which you bind in your grid column)
[Editable(false)]
public string ob_name { get; set; }
In your Costume class which using for your Kendo Ui Grid.
For details you can also see this
My suggestion is creating an editor function that validates the condition. This of course has the disadvantage that is an ad-hoc solution but ... it works!
Lets have the following entries (data of the DataSource):
Then I define the grid as:
Where
col1
andcol2
are dates andcol3
is a string that can be edited if and only ifcol1
is less thancol2
.I define
checkAndEdit
function as follow:Where I generate the corresponding
input
field ifcol1
<col2
and otherwise invokecloseCell
for exitingedit
mode.You can see it running here