Title: How I can control whether a cell is editable or not? Post by: catpaw on February 11, 2014, 06:01:59 PM hello fellow!!
I have an editable treegrid where I need to allow or block the edition of each cell depending on its value. if the cell value is equal to null -> not allow that cell is editable if the cell value is different from null -> allow editing of that cell the problem is that I can not block editing an entire row or column because there will be cells in the same column that may or may not be editable, same for the row. For example: here the treegrid: +--------------------+------------------------------------+-----------------------------------+----------------------------------+ | TITLE | Column 1 | Column 2 | Column 3 | | | subcolum 1.1 | subcolum 1.2 | subcolum 2.1 | subcolum 2.2 | subcolum 3.1 | subcolum 3.2 | +--------------------+------------------------------------+-------------------------------+--------------------------------------+ | topic 1 | cell editable | cell editable | cell editable | cell editable | cell editable | cell editable | +--------------------+------------------------------------+-----------------------------------+----------------------------------+ | topic 2 | cell editable | cell editable | No editable | No editable | No editable | No editable | +--------------------+------------------------------------+-----------------------------------+----------------------------------+ | topic 3 | cell editable | cell editable | cell editable | cell editable | No editable | No editable | +--------------------+------------------------------------+-----------------------------------+----------------------------------+ | topic 4 | No editable | No editable | No editable | No editable | No editable | No editable | +--------------------+------------------------------------+-----------------------------------+----------------------------------+ any idea? Title: Re: How I can control whether a cell is editable or not? Post by: stworthy on February 12, 2014, 12:32:35 AM Please use 'onBeforeEdit' event to set the field editors according to the row values. The code below shows how to achieve this functionality.
Code: $('#tg').treegrid({ Title: Re: How I can control whether a cell is editable or not? Post by: catpaw on February 12, 2014, 01:40:59 PM hi thank you
cost me some time to understand, but it succeeds so far so good!! thank you very much |