1

All the cells in my grid are editable initially.

I want to disable cell editing for certain cells based on a value.

How can this be done?

I have the trigger setup as follows:

dataBound: function() {
        $('td').each(function() {
            if ($(this).children('span').data('route') == 2) {
                $(this).css('background', '#CCC')
                // Disable cell editing for this cell
            }
        })
    },

All I need to know is what the line is to set the parameter for this cell to editable: false, e.g. this.something.editable = false

imperium2335
  • 23,402
  • 38
  • 111
  • 190
  • possible duplicate of [When editing a grid, how do I disable specific fields by row? Kendo UI](http://stackoverflow.com/questions/14221670/when-editing-a-grid-how-do-i-disable-specific-fields-by-row-kendo-ui) – OnaBai Aug 19 '13 at 06:43
  • @OnaBai My scenario does not look at adjacent cell values, it is looking at the span's data attribute in the template. – imperium2335 Aug 19 '13 at 06:47
  • 1
    The idea is the same, in the even handler you check the attribute and if the condition is not met you close the cell (afaik, this is the closest that you can get to it). – OnaBai Aug 19 '13 at 07:54
  • @OnaBai What is the command to close the cell in the context of what I have? – imperium2335 Aug 19 '13 at 08:00
  • You cannot do it in `dataBound`, you should do it in `edit` event and the command is `closeCell` – OnaBai Aug 19 '13 at 08:07

0 Answers0